/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl;

import bl.EmployeeBusiness;
import bl.DateEvaluator;
import bl.ModelComboBox;
import bl.ModelTableApproveLeave;
import bl.ModelTableCancelLeave;
import bl.ModelTableLeaveHistory;
import bl.ModelTableReportDetail;
import bl.ModelTableReportManager;
import bl.PagingTable;
import bl.StatusColumnCell;
import dal.ConnectDB;
import dal.Request;
import entity.Account;
import entity.Department;
import entity.Employee;
import entity.Holiday;
import entity.HolidayDetail;
import entity.LeaveDetail;
import entity.LeaveForm;
import entity.LeaveType;
import entity.OrganizationLevel;
import java.awt.Cursor;
import java.awt.HeadlessException;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Properties;
import javax.swing.JOptionPane;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JLabel;
import javax.swing.UIManager;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;

/**
 *
 * @author Kien Chinh
 */
public class FrameLMS extends javax.swing.JFrame {

    /**
     * Creates new form FrameLeave
     */
    Request request;
    EmployeeBusiness employeebuiness;
    Employee employee;
    ArrayList<LeaveType> listLeaveType;
    ArrayList<LeaveDetail> listLeaveDetail;
    ArrayList<LeaveForm> listForm;
    ArrayList<HolidayDetail> listHolidayDetail;
    ArrayList<Employee> listEmployee;
    ArrayList<Department> listDepartment;
    ArrayList<OrganizationLevel> listOrganization;
    String gender = null;

    public FrameLMS() {
        initComponents();
        this.setLocation(150, 100);
        //create variable
        request = new Request();
        employeebuiness = new EmployeeBusiness();
        MenuBar.setVisible(false);
        if (ConnectDB.testConnect()) {


            //test
            panelBackgroudLogin.setVisible(true); //test
            panelIndex.setVisible(false); //test

            //setModel
            homeCalendar.getDayChooser().addDateEvaluator(new DateEvaluator(request.getListHoliday()));


            //code act for field pass press Enter key !!!
            txt_pass.addKeyListener(new KeyAdapter() {
                @Override
                public void keyPressed(KeyEvent e) {
                    if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                        btn_LoginOk.doClick();
                    }
                }
            });
        } else {
            panelConfig.setVisible(true);
            panelBackgroudLogin.setVisible(false);
            panelIndex.setVisible(false);
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        groupGender = new javax.swing.ButtonGroup();
        panelBackgroudLogin = new javax.swing.JPanel();
        panel_Login = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txt_Username = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        btn_LoginOk = new javax.swing.JButton();
        txt_pass = new javax.swing.JPasswordField();
        label_ForgotPass = new javax.swing.JLabel();
        panelIndex = new javax.swing.JPanel();
        menuPanel_header = new javax.swing.JPanel();
        lbLogout = new javax.swing.JLabel();
        lbWelcome = new javax.swing.JLabel();
        tabbedPane_content = new javax.swing.JTabbedPane();
        tabContent = new javax.swing.JPanel();
        toolbar = new javax.swing.JPanel();
        toolHomePanel = new javax.swing.JPanel();
        btnHome = new javax.swing.JButton();
        toolInfoPanel = new javax.swing.JPanel();
        btnInfo = new javax.swing.JButton();
        btnAddEmployee = new javax.swing.JButton();
        toolLeavePanel = new javax.swing.JPanel();
        btnCancel = new javax.swing.JButton();
        btnApplyLeave = new javax.swing.JButton();
        btnHistory = new javax.swing.JButton();
        btnApproveLeave = new javax.swing.JButton();
        btnReport = new javax.swing.JButton();
        messagesPanel = new javax.swing.JPanel();
        btnMessageStuff = new javax.swing.JButton();
        txtSearch = new javax.swing.JTextField();
        lbSearch = new javax.swing.JLabel();
        mainPanel = new javax.swing.JPanel();
        mainHomePanel = new javax.swing.JPanel();
        mainHomeCalendar = new javax.swing.JPanel();
        homeCalendar = new com.toedter.calendar.JCalendar();
        mainHomeStatus = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        homeBarAnnual = new javax.swing.JProgressBar();
        homeBarMedical = new javax.swing.JProgressBar();
        mainInfoPanel = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        passConfirm = new javax.swing.JPasswordField();
        passNew = new javax.swing.JPasswordField();
        pass1 = new javax.swing.JPasswordField();
        btnSave = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        lblErroChangePass = new javax.swing.JLabel();
        palInformation = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        lblFullName = new javax.swing.JLabel();
        lblAddress = new javax.swing.JLabel();
        lblDepartment = new javax.swing.JLabel();
        lblGender = new javax.swing.JLabel();
        lblPhoneNumber = new javax.swing.JLabel();
        lblLevel = new javax.swing.JLabel();
        lblBirthday = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        palChangeif = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jLabel55 = new javax.swing.JLabel();
        jLabel56 = new javax.swing.JLabel();
        jLabel57 = new javax.swing.JLabel();
        lblLoi = new javax.swing.JLabel();
        txtNumber = new javax.swing.JTextField();
        txtAddress = new javax.swing.JTextField();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        mainHistoryPanel = new javax.swing.JPanel();
        leaveHistoryTitleBar = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        tableHistory = new javax.swing.JTable();
        mainHistoryPagingLabel = new javax.swing.JPanel();
        mainCancelPanel = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tableCancel = new javax.swing.JTable();
        tableCancelTitleBar = new javax.swing.JPanel();
        jLabel28 = new javax.swing.JLabel();
        mainApplyPanel = new javax.swing.JPanel();
        leaveSummaryPanel = new javax.swing.JPanel();
        leaveSummaryTitleBar = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        lbAnnualLeaveQuatity = new javax.swing.JLabel();
        lbAnnualLeaveTaken = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        lbAnnualLeaveBanlance = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        lbMedicalLeaveQuatity = new javax.swing.JLabel();
        lbMedicalLeaveTaken = new javax.swing.JLabel();
        lbMedicalLeaveBanlance = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        jLabel51 = new javax.swing.JLabel();
        lbAnnualLeavePending = new javax.swing.JLabel();
        jLabel52 = new javax.swing.JLabel();
        jLabel53 = new javax.swing.JLabel();
        lbMedicalLeavePending = new javax.swing.JLabel();
        leaveForm = new javax.swing.JPanel();
        leaveSummaryTitleBar1 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        comboBoxLeaveType = new javax.swing.JComboBox();
        dateChooserStartDate = new com.toedter.calendar.JDateChooser();
        dateChooserFinishDate = new com.toedter.calendar.JDateChooser();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtAreaReson = new javax.swing.JTextArea();
        btnSubmitApplyLeave = new javax.swing.JButton();
        btnFormCancel = new javax.swing.JButton();
        mainApplyCalendarPanel = new javax.swing.JPanel();
        applyCalendar = new com.toedter.calendar.JCalendar();
        mainMessagePanel = new javax.swing.JPanel();
        mainAddEmployee = new javax.swing.JPanel();
        addEmployeePanel = new javax.swing.JPanel();
        addEmployeeTitleBar = new javax.swing.JPanel();
        lbAddEmployeeTitle = new javax.swing.JLabel();
        lbAddEmployeeName = new javax.swing.JLabel();
        btnSubmitAddEmployee = new javax.swing.JButton();
        btnResetAddEmployee = new javax.swing.JButton();
        lbAddEmployeeName1 = new javax.swing.JLabel();
        lbAddEmployeeName2 = new javax.swing.JLabel();
        lbAddEmployeeName3 = new javax.swing.JLabel();
        txtAddFullName = new javax.swing.JTextField();
        txtAddAddress = new javax.swing.JTextField();
        lbAddEmployeeName5 = new javax.swing.JLabel();
        lbAddEmployeeName6 = new javax.swing.JLabel();
        lbAddEmployeeName7 = new javax.swing.JLabel();
        lbAddEmployeeName8 = new javax.swing.JLabel();
        lbAddEmployeeName9 = new javax.swing.JLabel();
        rbMale = new javax.swing.JRadioButton();
        rbFemale = new javax.swing.JRadioButton();
        txtAddLoginID = new javax.swing.JTextField();
        dateChooserAddBirthday = new com.toedter.calendar.JDateChooser();
        cbAddDepartmentName = new javax.swing.JComboBox();
        cbAddOrganizationLevel = new javax.swing.JComboBox();
        lbAddEmployeeName10 = new javax.swing.JLabel();
        addPassword = new javax.swing.JPasswordField();
        addRePassword = new javax.swing.JPasswordField();
        addLabelLoginError = new javax.swing.JLabel();
        addLabelPassError = new javax.swing.JLabel();
        addLabelPassError1 = new javax.swing.JLabel();
        txtAddTelephoneNumber = new javax.swing.JFormattedTextField();
        addLabelTelephoneError = new javax.swing.JLabel();
        lbAddEmployeeTitle2 = new javax.swing.JLabel();
        lbAddEmployeeTitle3 = new javax.swing.JLabel();
        addHolidayPanel = new javax.swing.JPanel();
        addHolidayTitleBar = new javax.swing.JPanel();
        lbAddEmployeeTitle1 = new javax.swing.JLabel();
        lbAddEmployeeName4 = new javax.swing.JLabel();
        lbasdasdwda = new javax.swing.JLabel();
        lbAddEmployeeName12 = new javax.swing.JLabel();
        txtHolidayDescription = new javax.swing.JTextField();
        dateChooseStartHoliday = new com.toedter.calendar.JDateChooser();
        dateChooseEndHoliday = new com.toedter.calendar.JDateChooser();
        btnSubmitHoliday = new javax.swing.JButton();
        mainReport = new javax.swing.JPanel();
        configTitleBar1 = new javax.swing.JPanel();
        jLabel37 = new javax.swing.JLabel();
        lbReportDepartment = new javax.swing.JLabel();
        lbReportName = new javax.swing.JLabel();
        btnReportBack = new javax.swing.JButton();
        yearReport = new com.toedter.calendar.JYearChooser();
        lbReportLevel = new javax.swing.JLabel();
        btnReportNext = new javax.swing.JButton();
        jScrollPane5 = new javax.swing.JScrollPane();
        tableReport = new javax.swing.JTable();
        mainReportPayingLabel = new javax.swing.JPanel();
        mainApproveLeave = new javax.swing.JPanel();
        mainInfoApproveLeave = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        ApproveLeaveTitleBar = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        lbApproveName = new javax.swing.JLabel();
        lbApproveTelephone = new javax.swing.JLabel();
        lbApproveAddress = new javax.swing.JLabel();
        lbApproveDepartment = new javax.swing.JLabel();
        lbApproveLevel = new javax.swing.JLabel();
        btnApproveCancel = new javax.swing.JButton();
        btnApprove = new javax.swing.JButton();
        jLabel54 = new javax.swing.JLabel();
        lbApproveWarning = new javax.swing.JLabel();
        mainTableApproveLeave = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        TableApproveLeave = new javax.swing.JTable();
        TableApproveLeaveTitleBar = new javax.swing.JPanel();
        jLabel29 = new javax.swing.JLabel();
        panelConfig = new javax.swing.JPanel();
        configTitleBar = new javax.swing.JPanel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        txtDBPort = new javax.swing.JTextField();
        txtDBUserName = new javax.swing.JTextField();
        txtDBPass = new javax.swing.JPasswordField();
        jLabel36 = new javax.swing.JLabel();
        txtDBIPaddress = new javax.swing.JTextField();
        btnDBSubmit = new javax.swing.JButton();
        MenuBar = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        itemFind = new javax.swing.JMenuItem();
        menuInfo = new javax.swing.JMenu();
        changePassword = new javax.swing.JMenuItem();
        itemAdd = new javax.swing.JMenuItem();
        menuLeave = new javax.swing.JMenu();
        itemHistory = new javax.swing.JMenuItem();
        itemApprove = new javax.swing.JMenuItem();
        itemCancel = new javax.swing.JMenuItem();
        itemApply = new javax.swing.JMenuItem();
        itemReport = new javax.swing.JMenuItem();
        menuHelp = new javax.swing.JMenu();
        About = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Leave Management System");
        setBackground(new java.awt.Color(255, 255, 255));
        getContentPane().setLayout(new java.awt.CardLayout());

        panelBackgroudLogin.setBackground(new java.awt.Color(215, 233, 250));
        panelBackgroudLogin.setLayout(new java.awt.GridBagLayout());

        panel_Login.setBackground(new java.awt.Color(255, 255, 255));
        panel_Login.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 0), "     Sign in to Leave management", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Franklin Gothic Medium", 1, 16), new java.awt.Color(33, 79, 125))); // NOI18N
        panel_Login.setMinimumSize(new java.awt.Dimension(500, 250));
        panel_Login.setPreferredSize(new java.awt.Dimension(450, 250));
        panel_Login.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                panel_LoginKeyPressed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
        jLabel1.setText("User name :");

        txt_Username.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
        txt_Username.setOpaque(false);
        txt_Username.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txt_UsernameKeyPressed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
        jLabel2.setText("Password :");

        btn_LoginOk.setBackground(new java.awt.Color(234, 234, 234));
        btn_LoginOk.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        btn_LoginOk.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/submit.png"))); // NOI18N
        btn_LoginOk.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btn_LoginOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_LoginOkActionPerformed(evt);
            }
        });

        txt_pass.setText("jPasswordField1");
        txt_pass.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txt_passMouseClicked(evt);
            }
        });
        txt_pass.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txt_passFocusGained(evt);
            }
        });

        label_ForgotPass.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        label_ForgotPass.setForeground(new java.awt.Color(40, 81, 235));
        label_ForgotPass.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        label_ForgotPass.setText("Forgot Password?               ");
        label_ForgotPass.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        label_ForgotPass.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                label_ForgotPassMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout panel_LoginLayout = new javax.swing.GroupLayout(panel_Login);
        panel_Login.setLayout(panel_LoginLayout);
        panel_LoginLayout.setHorizontalGroup(
            panel_LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_LoginLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(panel_LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(panel_LoginLayout.createSequentialGroup()
                        .addComponent(btn_LoginOk)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 213, Short.MAX_VALUE)
                        .addComponent(label_ForgotPass, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txt_Username, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txt_pass, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panel_LoginLayout.createSequentialGroup()
                        .addGroup(panel_LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel1))
                        .addGap(0, 40, Short.MAX_VALUE)))
                .addContainerGap())
        );
        panel_LoginLayout.setVerticalGroup(
            panel_LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_LoginLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txt_Username, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txt_pass, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(panel_LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(label_ForgotPass)
                    .addComponent(btn_LoginOk, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelBackgroudLogin.add(panel_Login, new java.awt.GridBagConstraints());

        getContentPane().add(panelBackgroudLogin, "card2");

        panelIndex.setBackground(new java.awt.Color(255, 255, 255));

        menuPanel_header.setBackground(new java.awt.Color(255, 255, 255));

        lbLogout.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        lbLogout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/logout1.png"))); // NOI18N
        lbLogout.setText("Logout");
        lbLogout.setToolTipText("Logout");
        lbLogout.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        lbLogout.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbLogoutMouseClicked(evt);
            }
        });

        lbWelcome.setFont(new java.awt.Font("Candara", 0, 10)); // NOI18N
        lbWelcome.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/welcome.png"))); // NOI18N
        lbWelcome.setText("Welcome guest !");
        lbWelcome.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbWelcomeMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout menuPanel_headerLayout = new javax.swing.GroupLayout(menuPanel_header);
        menuPanel_header.setLayout(menuPanel_headerLayout);
        menuPanel_headerLayout.setHorizontalGroup(
            menuPanel_headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, menuPanel_headerLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lbWelcome)
                .addGap(42, 42, 42)
                .addComponent(lbLogout, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        menuPanel_headerLayout.setVerticalGroup(
            menuPanel_headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(menuPanel_headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(lbLogout, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lbWelcome))
        );

        tabbedPane_content.setBackground(new java.awt.Color(255, 255, 255));
        tabbedPane_content.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N

        tabContent.setBackground(new java.awt.Color(64, 65, 66));

        toolbar.setBackground(new java.awt.Color(245, 245, 245));

        toolHomePanel.setBackground(new java.awt.Color(245, 245, 245));
        toolHomePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(111, 113, 114), 2), "Home", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Candara", 0, 10), new java.awt.Color(0, 0, 0))); // NOI18N

        btnHome.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/home.png"))); // NOI18N
        btnHome.setToolTipText("Home");
        btnHome.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnHomeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout toolHomePanelLayout = new javax.swing.GroupLayout(toolHomePanel);
        toolHomePanel.setLayout(toolHomePanelLayout);
        toolHomePanelLayout.setHorizontalGroup(
            toolHomePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, toolHomePanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnHome)
                .addContainerGap())
        );
        toolHomePanelLayout.setVerticalGroup(
            toolHomePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(btnHome, javax.swing.GroupLayout.Alignment.TRAILING)
        );

        toolInfoPanel.setBackground(new java.awt.Color(245, 245, 245));
        toolInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(111, 113, 114), 2), "Information", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Candara", 0, 10), new java.awt.Color(0, 0, 0))); // NOI18N

        btnInfo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/info.png"))); // NOI18N
        btnInfo.setToolTipText("Information");
        btnInfo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInfoActionPerformed(evt);
            }
        });

        btnAddEmployee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/adde.png"))); // NOI18N
        btnAddEmployee.setToolTipText("Add");
        btnAddEmployee.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddEmployeeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout toolInfoPanelLayout = new javax.swing.GroupLayout(toolInfoPanel);
        toolInfoPanel.setLayout(toolInfoPanelLayout);
        toolInfoPanelLayout.setHorizontalGroup(
            toolInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(toolInfoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAddEmployee, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        toolInfoPanelLayout.setVerticalGroup(
            toolInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
            .addComponent(btnInfo)
            .addComponent(btnAddEmployee)
        );

        toolLeavePanel.setBackground(new java.awt.Color(245, 245, 245));
        toolLeavePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(111, 113, 114), 2), "Leaves", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Candara", 0, 10), new java.awt.Color(0, 0, 0))); // NOI18N

        btnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel.png"))); // NOI18N
        btnCancel.setToolTipText("Cancel Leave");
        btnCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelActionPerformed(evt);
            }
        });

        btnApplyLeave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/apply.png"))); // NOI18N
        btnApplyLeave.setToolTipText("Apply Leave");
        btnApplyLeave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnApplyLeaveActionPerformed(evt);
            }
        });

        btnHistory.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/history.png"))); // NOI18N
        btnHistory.setToolTipText("Leave History");
        btnHistory.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnHistoryActionPerformed(evt);
            }
        });

        btnApproveLeave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/approve.png"))); // NOI18N
        btnApproveLeave.setToolTipText("Approve Leave");
        btnApproveLeave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnApproveLeaveActionPerformed(evt);
            }
        });

        btnReport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/report.png"))); // NOI18N
        btnReport.setToolTipText("Report");
        btnReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout toolLeavePanelLayout = new javax.swing.GroupLayout(toolLeavePanel);
        toolLeavePanel.setLayout(toolLeavePanelLayout);
        toolLeavePanelLayout.setHorizontalGroup(
            toolLeavePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(toolLeavePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnHistory)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnApproveLeave)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnCancel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnApplyLeave)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnReport)
                .addContainerGap())
        );
        toolLeavePanelLayout.setVerticalGroup(
            toolLeavePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(btnCancel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btnApplyLeave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btnHistory, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btnApproveLeave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btnReport, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        messagesPanel.setBackground(new java.awt.Color(245, 245, 245));
        messagesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(111, 113, 114), 2), "Messages", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Candara", 0, 10), new java.awt.Color(0, 0, 0))); // NOI18N
        messagesPanel.setToolTipText("");

        btnMessageStuff.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/messages.png"))); // NOI18N
        btnMessageStuff.setToolTipText("Messages");
        btnMessageStuff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMessageStuffActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout messagesPanelLayout = new javax.swing.GroupLayout(messagesPanel);
        messagesPanel.setLayout(messagesPanelLayout);
        messagesPanelLayout.setHorizontalGroup(
            messagesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(messagesPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnMessageStuff)
                .addContainerGap(13, Short.MAX_VALUE))
        );
        messagesPanelLayout.setVerticalGroup(
            messagesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(btnMessageStuff, javax.swing.GroupLayout.Alignment.TRAILING)
        );

        txtSearch.setBackground(new java.awt.Color(220, 220, 220));
        txtSearch.setFont(new java.awt.Font("Candara", 0, 11)); // NOI18N
        txtSearch.setText("Search employee !!");
        txtSearch.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtSearchMouseClicked(evt);
            }
        });

        lbSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/search.png"))); // NOI18N
        lbSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        lbSearch.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbSearchMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout toolbarLayout = new javax.swing.GroupLayout(toolbar);
        toolbar.setLayout(toolbarLayout);
        toolbarLayout.setHorizontalGroup(
            toolbarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(toolbarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(toolHomePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toolInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toolLeavePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(messagesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbSearch)
                .addContainerGap())
        );
        toolbarLayout.setVerticalGroup(
            toolbarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(toolbarLayout.createSequentialGroup()
                .addGroup(toolbarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(toolbarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(toolInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(messagesPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(toolLeavePanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(toolHomePanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(toolbarLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(toolbarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbSearch)
                    .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        mainPanel.setLayout(new java.awt.CardLayout());

        mainHomePanel.setBackground(new java.awt.Color(255, 255, 255));
        mainHomePanel.setForeground(new java.awt.Color(65, 65, 65));

        mainHomeCalendar.setBackground(new java.awt.Color(255, 255, 255));
        mainHomeCalendar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        mainHomeCalendar.setPreferredSize(new java.awt.Dimension(450, 450));

        homeCalendar.setTodayButtonText("");
        homeCalendar.setTodayButtonVisible(true);

        javax.swing.GroupLayout mainHomeCalendarLayout = new javax.swing.GroupLayout(mainHomeCalendar);
        mainHomeCalendar.setLayout(mainHomeCalendarLayout);
        mainHomeCalendarLayout.setHorizontalGroup(
            mainHomeCalendarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainHomeCalendarLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(homeCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, 520, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        mainHomeCalendarLayout.setVerticalGroup(
            mainHomeCalendarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(homeCalendar, javax.swing.GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE)
        );

        mainHomeStatus.setBackground(new java.awt.Color(255, 255, 255));

        jLabel31.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel31.setText("Annual Leave  Status :");

        jLabel30.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel30.setText("Medical Leave Status :");

        homeBarAnnual.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        homeBarAnnual.setForeground(new java.awt.Color(65, 65, 65));
        homeBarAnnual.setStringPainted(true);

        homeBarMedical.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        homeBarMedical.setForeground(new java.awt.Color(65, 65, 65));
        homeBarMedical.setStringPainted(true);

        javax.swing.GroupLayout mainHomeStatusLayout = new javax.swing.GroupLayout(mainHomeStatus);
        mainHomeStatus.setLayout(mainHomeStatusLayout);
        mainHomeStatusLayout.setHorizontalGroup(
            mainHomeStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainHomeStatusLayout.createSequentialGroup()
                .addGap(79, 79, 79)
                .addGroup(mainHomeStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(homeBarMedical, javax.swing.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE)
                    .addComponent(jLabel31, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel30, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(homeBarAnnual, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(247, Short.MAX_VALUE))
        );
        mainHomeStatusLayout.setVerticalGroup(
            mainHomeStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainHomeStatusLayout.createSequentialGroup()
                .addGap(98, 98, 98)
                .addComponent(jLabel31)
                .addGap(18, 18, 18)
                .addComponent(homeBarAnnual, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel30)
                .addGap(18, 18, 18)
                .addComponent(homeBarMedical, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(156, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout mainHomePanelLayout = new javax.swing.GroupLayout(mainHomePanel);
        mainHomePanel.setLayout(mainHomePanelLayout);
        mainHomePanelLayout.setHorizontalGroup(
            mainHomePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainHomePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(mainHomeStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(mainHomeCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, 542, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        mainHomePanelLayout.setVerticalGroup(
            mainHomePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainHomePanelLayout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(mainHomePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(mainHomeStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(mainHomeCalendar, javax.swing.GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE))
                .addContainerGap(41, Short.MAX_VALUE))
        );

        mainPanel.add(mainHomePanel, "card2");

        mainInfoPanel.setBackground(new java.awt.Color(255, 255, 255));

        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(213, 233, 250)));

        jPanel5.setBackground(new java.awt.Color(215, 233, 250));

        jLabel38.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel38.setText("Change Password");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel38)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel38, javax.swing.GroupLayout.Alignment.TRAILING)
        );

        jLabel39.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel39.setText("New Password :");

        jLabel40.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel40.setText("Current Password :");

        jLabel41.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel41.setText("Confirm New Password :");

        passConfirm.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N

        passNew.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        passNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                passNewActionPerformed(evt);
            }
        });

        pass1.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N

        btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/save-icon.png"))); // NOI18N
        btnSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveActionPerformed(evt);
            }
        });

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/reload.png"))); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        lblErroChangePass.setForeground(new java.awt.Color(255, 0, 0));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblErroChangePass, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel39))
                                .addGap(40, 40, 40))
                            .addComponent(jLabel41, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(passConfirm)
                            .addComponent(passNew)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                        .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(pass1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addComponent(lblErroChangePass, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel40)
                    .addComponent(pass1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(passNew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel41)
                    .addComponent(passConfirm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        palInformation.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(213, 233, 250)));

        jPanel4.setBackground(new java.awt.Color(215, 233, 250));

        jLabel42.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel42.setText("Information");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel42)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel42))
        );

        jLabel43.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel43.setText("FullName : ");

        jLabel44.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel44.setText("Birthday : ");

        jLabel45.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel45.setText("Gender : ");

        jLabel46.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel46.setText("Phone Number :");

        jLabel47.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel47.setText("Address :");

        jLabel48.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel48.setText("Organization Level :  ");

        jLabel49.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel49.setText("Department : ");

        lblFullName.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lblFullName.setText("jLabel29");

        lblAddress.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        lblAddress.setText("jLabel29");

        lblDepartment.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lblDepartment.setText("jLabel29");

        lblGender.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lblGender.setText("jLabel29");

        lblPhoneNumber.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        lblPhoneNumber.setText("jLabel29");

        lblLevel.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lblLevel.setText("jLabel29");

        lblBirthday.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        lblBirthday.setText("jLabel29");

        jButton1.setFont(new java.awt.Font("Candara", 1, 18)); // NOI18N
        jButton1.setText("Change");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout palInformationLayout = new javax.swing.GroupLayout(palInformation);
        palInformation.setLayout(palInformationLayout);
        palInformationLayout.setHorizontalGroup(
            palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(palInformationLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(palInformationLayout.createSequentialGroup()
                        .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel48)
                            .addComponent(jLabel49)
                            .addComponent(jLabel47)
                            .addComponent(jLabel46)
                            .addComponent(jLabel45)
                            .addComponent(jLabel44)
                            .addComponent(jLabel43))
                        .addGap(18, 18, 18)
                        .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblFullName)
                            .addComponent(lblBirthday)
                            .addComponent(lblGender)
                            .addComponent(lblPhoneNumber)
                            .addComponent(lblAddress)
                            .addComponent(lblDepartment)
                            .addComponent(lblLevel))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        palInformationLayout.setVerticalGroup(
            palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(palInformationLayout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(29, 29, 29)
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel43)
                    .addComponent(lblFullName))
                .addGap(18, 18, 18)
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel44)
                    .addComponent(lblBirthday))
                .addGap(18, 18, 18)
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel45)
                    .addComponent(lblGender))
                .addGap(18, 18, 18)
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel46)
                    .addComponent(lblPhoneNumber))
                .addGap(18, 18, 18)
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel47)
                    .addComponent(lblAddress))
                .addGap(18, 18, 18)
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel49)
                    .addComponent(lblDepartment))
                .addGap(18, 18, 18)
                .addGroup(palInformationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel48)
                    .addComponent(lblLevel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 124, Short.MAX_VALUE))
        );

        jPanel6.setBackground(new java.awt.Color(215, 233, 250));

        jLabel55.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel55.setText("Change Information");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel55)
                .addContainerGap(63, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel55, javax.swing.GroupLayout.Alignment.TRAILING)
        );

        jLabel56.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel56.setText("Address :");

        jLabel57.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel57.setText("Phone Number :");

        lblLoi.setForeground(new java.awt.Color(255, 0, 51));

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/submit.png"))); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/dest.png"))); // NOI18N
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout palChangeifLayout = new javax.swing.GroupLayout(palChangeif);
        palChangeif.setLayout(palChangeifLayout);
        palChangeifLayout.setHorizontalGroup(
            palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(palChangeifLayout.createSequentialGroup()
                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(palChangeifLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblLoi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(palChangeifLayout.createSequentialGroup()
                        .addGroup(palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel57)
                            .addComponent(jLabel56))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNumber)
                            .addComponent(txtAddress))))
                .addContainerGap())
        );
        palChangeifLayout.setVerticalGroup(
            palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(palChangeifLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lblLoi, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel57)
                    .addComponent(txtNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel56)
                    .addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(palChangeifLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout mainInfoPanelLayout = new javax.swing.GroupLayout(mainInfoPanel);
        mainInfoPanel.setLayout(mainInfoPanelLayout);
        mainInfoPanelLayout.setHorizontalGroup(
            mainInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainInfoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(palInformation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(palChangeif, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(361, Short.MAX_VALUE))
        );
        mainInfoPanelLayout.setVerticalGroup(
            mainInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainInfoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(mainInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(palInformation, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(mainInfoPanelLayout.createSequentialGroup()
                        .addComponent(palChangeif, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );

        mainPanel.add(mainInfoPanel, "card2");

        mainHistoryPanel.setBackground(new java.awt.Color(255, 255, 255));

        leaveHistoryTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        jLabel22.setBackground(new java.awt.Color(215, 233, 250));
        jLabel22.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel22.setText("       Leave history :");

        javax.swing.GroupLayout leaveHistoryTitleBarLayout = new javax.swing.GroupLayout(leaveHistoryTitleBar);
        leaveHistoryTitleBar.setLayout(leaveHistoryTitleBarLayout);
        leaveHistoryTitleBarLayout.setHorizontalGroup(
            leaveHistoryTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveHistoryTitleBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        leaveHistoryTitleBarLayout.setVerticalGroup(
            leaveHistoryTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveHistoryTitleBarLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel22))
        );

        tableHistory.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane4.setViewportView(tableHistory);

        mainHistoryPagingLabel.setBackground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout mainHistoryPanelLayout = new javax.swing.GroupLayout(mainHistoryPanel);
        mainHistoryPanel.setLayout(mainHistoryPanelLayout);
        mainHistoryPanelLayout.setHorizontalGroup(
            mainHistoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainHistoryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(mainHistoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(leaveHistoryTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(mainHistoryPagingLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 1226, Short.MAX_VALUE))
                .addContainerGap())
        );
        mainHistoryPanelLayout.setVerticalGroup(
            mainHistoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainHistoryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(leaveHistoryTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 378, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(mainHistoryPagingLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        mainPanel.add(mainHistoryPanel, "card2");

        mainCancelPanel.setBackground(new java.awt.Color(255, 255, 255));

        tableCancel.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableCancel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        tableCancel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableCancelMouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(tableCancel);

        tableCancelTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        jLabel28.setBackground(new java.awt.Color(215, 233, 250));
        jLabel28.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel28.setText("Cancel Leave :");

        javax.swing.GroupLayout tableCancelTitleBarLayout = new javax.swing.GroupLayout(tableCancelTitleBar);
        tableCancelTitleBar.setLayout(tableCancelTitleBarLayout);
        tableCancelTitleBarLayout.setHorizontalGroup(
            tableCancelTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tableCancelTitleBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        tableCancelTitleBarLayout.setVerticalGroup(
            tableCancelTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tableCancelTitleBarLayout.createSequentialGroup()
                .addComponent(jLabel28)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout mainCancelPanelLayout = new javax.swing.GroupLayout(mainCancelPanel);
        mainCancelPanel.setLayout(mainCancelPanelLayout);
        mainCancelPanelLayout.setHorizontalGroup(
            mainCancelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainCancelPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(mainCancelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tableCancelTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1226, Short.MAX_VALUE))
                .addContainerGap())
        );
        mainCancelPanelLayout.setVerticalGroup(
            mainCancelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainCancelPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tableCancelTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE)
                .addContainerGap())
        );

        mainPanel.add(mainCancelPanel, "card2");

        mainApplyPanel.setBackground(new java.awt.Color(255, 255, 255));

        leaveSummaryPanel.setBackground(new java.awt.Color(255, 255, 255));
        leaveSummaryPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(215, 233, 250)));

        leaveSummaryTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        jLabel3.setBackground(new java.awt.Color(215, 233, 250));
        jLabel3.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel3.setText("Leave Summary :");

        javax.swing.GroupLayout leaveSummaryTitleBarLayout = new javax.swing.GroupLayout(leaveSummaryTitleBar);
        leaveSummaryTitleBar.setLayout(leaveSummaryTitleBarLayout);
        leaveSummaryTitleBarLayout.setHorizontalGroup(
            leaveSummaryTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        leaveSummaryTitleBarLayout.setVerticalGroup(
            leaveSummaryTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(leaveSummaryTitleBarLayout.createSequentialGroup()
                .addComponent(jLabel3)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jLabel4.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel4.setText("Annual Leave quatity :");

        jLabel5.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel5.setText("Taken :");

        jLabel6.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel6.setText("Banlance :");

        jLabel7.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel7.setText("Medical Leave quantity :");

        lbAnnualLeaveQuatity.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbAnnualLeaveQuatity.setText("0");

        lbAnnualLeaveTaken.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbAnnualLeaveTaken.setText("0");

        jLabel8.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel8.setText("Leaves");

        jLabel9.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel9.setText("Leaves");

        jLabel10.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel10.setText("Leaves");

        lbAnnualLeaveBanlance.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbAnnualLeaveBanlance.setText("0");

        jLabel11.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel11.setText("Taken :");

        jLabel12.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel12.setText("Banlance :");

        jLabel13.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel13.setText("Leaves");

        jLabel14.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel14.setText("Leaves");

        jLabel15.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel15.setText("Leaves");

        lbMedicalLeaveQuatity.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbMedicalLeaveQuatity.setText("0");

        lbMedicalLeaveTaken.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbMedicalLeaveTaken.setText("0");

        lbMedicalLeaveBanlance.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbMedicalLeaveBanlance.setText("0");

        jLabel50.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel50.setText("Pending :");

        jLabel51.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel51.setText("Pending :");

        lbAnnualLeavePending.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbAnnualLeavePending.setText("0");

        jLabel52.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel52.setText("Leaves");

        jLabel53.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel53.setText("Leaves");

        lbMedicalLeavePending.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        lbMedicalLeavePending.setText("0");

        javax.swing.GroupLayout leaveSummaryPanelLayout = new javax.swing.GroupLayout(leaveSummaryPanel);
        leaveSummaryPanel.setLayout(leaveSummaryPanelLayout);
        leaveSummaryPanelLayout.setHorizontalGroup(
            leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(leaveSummaryTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveSummaryPanelLayout.createSequentialGroup()
                        .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel12)
                            .addComponent(jLabel50)
                            .addComponent(jLabel7)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                                    .addComponent(lbMedicalLeaveQuatity)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel13))
                                .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                                    .addComponent(lbMedicalLeaveBanlance)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel15)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveSummaryPanelLayout.createSequentialGroup()
                                .addComponent(lbMedicalLeavePending)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel53))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveSummaryPanelLayout.createSequentialGroup()
                                .addComponent(lbMedicalLeaveTaken)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel14))))
                    .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                        .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel11)
                            .addComponent(jLabel51)
                            .addComponent(jLabel6))
                        .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbAnnualLeaveQuatity, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lbAnnualLeaveTaken, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel9)))
                            .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                                .addGap(80, 80, 80)
                                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                                        .addComponent(lbAnnualLeaveBanlance, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jLabel10))
                                    .addGroup(leaveSummaryPanelLayout.createSequentialGroup()
                                        .addGap(0, 0, Short.MAX_VALUE)
                                        .addComponent(lbAnnualLeavePending)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jLabel52)))))))
                .addContainerGap())
        );
        leaveSummaryPanelLayout.setVerticalGroup(
            leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveSummaryPanelLayout.createSequentialGroup()
                .addComponent(leaveSummaryTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(lbAnnualLeaveQuatity)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbAnnualLeaveTaken)
                    .addComponent(jLabel9)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel51)
                    .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lbAnnualLeavePending)
                        .addComponent(jLabel52)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbAnnualLeaveBanlance)
                    .addComponent(jLabel10)
                    .addComponent(jLabel6))
                .addGap(42, 42, 42)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(lbMedicalLeaveQuatity)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(lbMedicalLeaveTaken)
                    .addComponent(jLabel14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel50)
                    .addComponent(jLabel53)
                    .addComponent(lbMedicalLeavePending))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(leaveSummaryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(lbMedicalLeaveBanlance)
                    .addComponent(jLabel15))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        leaveForm.setBackground(new java.awt.Color(255, 255, 255));
        leaveForm.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(215, 233, 250)));

        leaveSummaryTitleBar1.setBackground(new java.awt.Color(215, 233, 250));

        jLabel16.setBackground(new java.awt.Color(215, 233, 250));
        jLabel16.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel16.setText("Leave form :");

        javax.swing.GroupLayout leaveSummaryTitleBar1Layout = new javax.swing.GroupLayout(leaveSummaryTitleBar1);
        leaveSummaryTitleBar1.setLayout(leaveSummaryTitleBar1Layout);
        leaveSummaryTitleBar1Layout.setHorizontalGroup(
            leaveSummaryTitleBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        leaveSummaryTitleBar1Layout.setVerticalGroup(
            leaveSummaryTitleBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(leaveSummaryTitleBar1Layout.createSequentialGroup()
                .addComponent(jLabel16)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jLabel17.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel17.setText("Leave type :");

        jLabel18.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel18.setText("Leave start date :");

        jLabel19.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel19.setText("Leave end date  :");

        jLabel20.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel20.setText("Reson :");

        comboBoxLeaveType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        txtAreaReson.setColumns(20);
        txtAreaReson.setRows(5);
        jScrollPane1.setViewportView(txtAreaReson);

        btnSubmitApplyLeave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/submit.png"))); // NOI18N
        btnSubmitApplyLeave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSubmitApplyLeaveActionPerformed(evt);
            }
        });

        btnFormCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/dest.png"))); // NOI18N
        btnFormCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFormCancelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout leaveFormLayout = new javax.swing.GroupLayout(leaveForm);
        leaveForm.setLayout(leaveFormLayout);
        leaveFormLayout.setHorizontalGroup(
            leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(leaveSummaryTitleBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(leaveFormLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(leaveFormLayout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(dateChooserFinishDate, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(leaveFormLayout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(comboBoxLeaveType, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(leaveFormLayout.createSequentialGroup()
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(dateChooserStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(leaveFormLayout.createSequentialGroup()
                        .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, leaveFormLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnSubmitApplyLeave)
                        .addGap(18, 18, 18)
                        .addComponent(btnFormCancel)))
                .addContainerGap())
        );
        leaveFormLayout.setVerticalGroup(
            leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(leaveFormLayout.createSequentialGroup()
                .addGroup(leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(leaveFormLayout.createSequentialGroup()
                        .addComponent(leaveSummaryTitleBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel17)
                            .addComponent(comboBoxLeaveType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jLabel18))
                    .addComponent(dateChooserStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel19)
                    .addComponent(dateChooserFinishDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel20)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(leaveFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSubmitApplyLeave)
                    .addComponent(btnFormCancel))
                .addGap(0, 116, Short.MAX_VALUE))
        );

        mainApplyCalendarPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        mainApplyCalendarPanel.setPreferredSize(new java.awt.Dimension(450, 450));

        applyCalendar.setTodayButtonText("");
        applyCalendar.setTodayButtonVisible(true);

        javax.swing.GroupLayout mainApplyCalendarPanelLayout = new javax.swing.GroupLayout(mainApplyCalendarPanel);
        mainApplyCalendarPanel.setLayout(mainApplyCalendarPanelLayout);
        mainApplyCalendarPanelLayout.setHorizontalGroup(
            mainApplyCalendarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(applyCalendar, javax.swing.GroupLayout.DEFAULT_SIZE, 559, Short.MAX_VALUE)
        );
        mainApplyCalendarPanelLayout.setVerticalGroup(
            mainApplyCalendarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(applyCalendar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout mainApplyPanelLayout = new javax.swing.GroupLayout(mainApplyPanel);
        mainApplyPanel.setLayout(mainApplyPanelLayout);
        mainApplyPanelLayout.setHorizontalGroup(
            mainApplyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainApplyPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(leaveSummaryPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(leaveForm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(mainApplyCalendarPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31))
        );
        mainApplyPanelLayout.setVerticalGroup(
            mainApplyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainApplyPanelLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(mainApplyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(leaveSummaryPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(leaveForm, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(mainApplyCalendarPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 431, Short.MAX_VALUE))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        mainPanel.add(mainApplyPanel, "card2");

        mainMessagePanel.setBackground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout mainMessagePanelLayout = new javax.swing.GroupLayout(mainMessagePanel);
        mainMessagePanel.setLayout(mainMessagePanelLayout);
        mainMessagePanelLayout.setHorizontalGroup(
            mainMessagePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1246, Short.MAX_VALUE)
        );
        mainMessagePanelLayout.setVerticalGroup(
            mainMessagePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 478, Short.MAX_VALUE)
        );

        mainPanel.add(mainMessagePanel, "card2");

        mainAddEmployee.setBackground(new java.awt.Color(255, 255, 255));

        addEmployeePanel.setBackground(new java.awt.Color(255, 255, 255));
        addEmployeePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(215, 233, 250)));

        addEmployeeTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        lbAddEmployeeTitle.setBackground(new java.awt.Color(215, 233, 250));
        lbAddEmployeeTitle.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        lbAddEmployeeTitle.setText("Add Employee :");

        javax.swing.GroupLayout addEmployeeTitleBarLayout = new javax.swing.GroupLayout(addEmployeeTitleBar);
        addEmployeeTitleBar.setLayout(addEmployeeTitleBarLayout);
        addEmployeeTitleBarLayout.setHorizontalGroup(
            addEmployeeTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lbAddEmployeeTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        addEmployeeTitleBarLayout.setVerticalGroup(
            addEmployeeTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addEmployeeTitleBarLayout.createSequentialGroup()
                .addComponent(lbAddEmployeeTitle)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        lbAddEmployeeName.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName.setText("Full Name :");

        btnSubmitAddEmployee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/submit.png"))); // NOI18N
        btnSubmitAddEmployee.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnSubmitAddEmployee.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSubmitAddEmployeeActionPerformed(evt);
            }
        });

        btnResetAddEmployee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/dest.png"))); // NOI18N
        btnResetAddEmployee.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnResetAddEmployee.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnResetAddEmployeeActionPerformed(evt);
            }
        });

        lbAddEmployeeName1.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName1.setText("Birthday :");

        lbAddEmployeeName2.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName2.setText("Telephone :");

        lbAddEmployeeName3.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName3.setText("Adress :");

        txtAddFullName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAddFullNameActionPerformed(evt);
            }
        });

        txtAddAddress.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAddAddressActionPerformed(evt);
            }
        });

        lbAddEmployeeName5.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName5.setText("Department :");

        lbAddEmployeeName6.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName6.setText("Organization :");

        lbAddEmployeeName7.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName7.setText("Gender :");

        lbAddEmployeeName8.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName8.setText("Login ID :");

        lbAddEmployeeName9.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName9.setText("Password :");

        groupGender.add(rbMale);
        rbMale.setText("Male");
        rbMale.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbMaleActionPerformed(evt);
            }
        });

        groupGender.add(rbFemale);
        rbFemale.setText("Female");
        rbFemale.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbFemaleActionPerformed(evt);
            }
        });

        txtAddLoginID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAddLoginIDActionPerformed(evt);
            }
        });

        cbAddDepartmentName.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbAddDepartmentName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbAddDepartmentNameActionPerformed(evt);
            }
        });

        cbAddOrganizationLevel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        lbAddEmployeeName10.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName10.setText("Re-Password :");

        addPassword.setText("jPasswordField1");
        addPassword.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                addPasswordMouseClicked(evt);
            }
        });
        addPassword.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                addPasswordFocusGained(evt);
            }
        });

        addRePassword.setText("jPasswordField1");
        addRePassword.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                addRePasswordMouseClicked(evt);
            }
        });
        addRePassword.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                addRePasswordFocusGained(evt);
            }
        });

        addLabelLoginError.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        addLabelLoginError.setForeground(new java.awt.Color(255, 0, 0));
        addLabelLoginError.setText("* LoginID must 12 < character");

        addLabelPassError.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        addLabelPassError.setForeground(new java.awt.Color(255, 0, 0));
        addLabelPassError.setText("* Password must 20 < character");

        addLabelPassError1.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        addLabelPassError1.setForeground(new java.awt.Color(255, 0, 0));
        addLabelPassError1.setText("* re-Password must equal password");

        txtAddTelephoneNumber.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#"))));

        addLabelTelephoneError.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        addLabelTelephoneError.setForeground(new java.awt.Color(255, 0, 0));
        addLabelTelephoneError.setText("* Telephone must number");

        lbAddEmployeeTitle2.setBackground(new java.awt.Color(215, 233, 250));
        lbAddEmployeeTitle2.setFont(new java.awt.Font("Candara", 1, 18)); // NOI18N
        lbAddEmployeeTitle2.setText("   Infomation :");

        lbAddEmployeeTitle3.setBackground(new java.awt.Color(215, 233, 250));
        lbAddEmployeeTitle3.setFont(new java.awt.Font("Candara", 1, 18)); // NOI18N
        lbAddEmployeeTitle3.setText("   Account :");

        javax.swing.GroupLayout addEmployeePanelLayout = new javax.swing.GroupLayout(addEmployeePanel);
        addEmployeePanel.setLayout(addEmployeePanelLayout);
        addEmployeePanelLayout.setHorizontalGroup(
            addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(addEmployeeTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(addEmployeePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(addEmployeePanelLayout.createSequentialGroup()
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbAddEmployeeName10)
                            .addComponent(lbAddEmployeeName9)
                            .addComponent(lbAddEmployeeName8))
                        .addGap(18, 18, 18)
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtAddLoginID, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                            .addComponent(addPassword)
                            .addComponent(addRePassword))
                        .addGap(18, 18, 18)
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(addLabelLoginError)
                            .addComponent(addLabelPassError)
                            .addComponent(addLabelPassError1))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(addEmployeePanelLayout.createSequentialGroup()
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(addEmployeePanelLayout.createSequentialGroup()
                                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(addEmployeePanelLayout.createSequentialGroup()
                                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lbAddEmployeeName)
                                            .addComponent(lbAddEmployeeName1))
                                        .addGap(56, 56, 56)
                                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(txtAddFullName, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                                            .addComponent(dateChooserAddBirthday, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                    .addGroup(addEmployeePanelLayout.createSequentialGroup()
                                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lbAddEmployeeName2)
                                            .addComponent(lbAddEmployeeName3))
                                        .addGap(53, 53, 53)
                                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtAddAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(addEmployeePanelLayout.createSequentialGroup()
                                                .addComponent(txtAddTelephoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(addLabelTelephoneError)))))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 195, Short.MAX_VALUE)
                                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbAddEmployeeName7, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lbAddEmployeeName5, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lbAddEmployeeName6, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addGap(39, 39, 39)
                                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(addEmployeePanelLayout.createSequentialGroup()
                                        .addComponent(rbMale)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(rbFemale))
                                    .addComponent(cbAddDepartmentName, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(cbAddOrganizationLevel, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addEmployeePanelLayout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(btnSubmitAddEmployee)
                                .addGap(18, 18, 18)
                                .addComponent(btnResetAddEmployee))
                            .addComponent(lbAddEmployeeTitle2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lbAddEmployeeTitle3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap())))
        );
        addEmployeePanelLayout.setVerticalGroup(
            addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addEmployeePanelLayout.createSequentialGroup()
                .addComponent(addEmployeeTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(lbAddEmployeeTitle2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 11, Short.MAX_VALUE)
                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addEmployeePanelLayout.createSequentialGroup()
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbAddEmployeeName)
                            .addComponent(txtAddFullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(rbFemale)
                            .addComponent(rbMale)
                            .addComponent(lbAddEmployeeName7))
                        .addGap(11, 11, 11)
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbAddEmployeeName1)
                            .addComponent(dateChooserAddBirthday, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbAddDepartmentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lbAddEmployeeName5)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbAddEmployeeName2)
                    .addComponent(lbAddEmployeeName6)
                    .addComponent(cbAddOrganizationLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAddTelephoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(addLabelTelephoneError))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbAddEmployeeName3)
                    .addComponent(txtAddAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(24, 24, 24)
                .addComponent(lbAddEmployeeTitle3)
                .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(addEmployeePanelLayout.createSequentialGroup()
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbAddEmployeeName8)
                            .addComponent(txtAddLoginID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(addLabelLoginError))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbAddEmployeeName9)
                            .addComponent(addPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(addLabelPassError))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(addEmployeePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbAddEmployeeName10)
                            .addComponent(addRePassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(addLabelPassError1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 131, Short.MAX_VALUE)
                        .addComponent(btnResetAddEmployee))
                    .addGroup(addEmployeePanelLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnSubmitAddEmployee)))
                .addContainerGap())
        );

        addLabelLoginError.setVisible(false);
        addLabelPassError.setVisible(false);
        addLabelPassError1.setVisible(false);
        addLabelTelephoneError.setVisible(false);

        addHolidayPanel.setBackground(new java.awt.Color(255, 255, 255));
        addHolidayPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(215, 233, 250)));

        addHolidayTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        lbAddEmployeeTitle1.setBackground(new java.awt.Color(215, 233, 250));
        lbAddEmployeeTitle1.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        lbAddEmployeeTitle1.setText("Add Holiday :");

        javax.swing.GroupLayout addHolidayTitleBarLayout = new javax.swing.GroupLayout(addHolidayTitleBar);
        addHolidayTitleBar.setLayout(addHolidayTitleBarLayout);
        addHolidayTitleBarLayout.setHorizontalGroup(
            addHolidayTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lbAddEmployeeTitle1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        addHolidayTitleBarLayout.setVerticalGroup(
            addHolidayTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addHolidayTitleBarLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(lbAddEmployeeTitle1))
        );

        lbAddEmployeeName4.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName4.setText("Description :");

        lbasdasdwda.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbasdasdwda.setText("Start Date :");

        lbAddEmployeeName12.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbAddEmployeeName12.setText("End Date :");

        btnSubmitHoliday.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/submit.png"))); // NOI18N
        btnSubmitHoliday.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnSubmitHoliday.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSubmitHolidayActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout addHolidayPanelLayout = new javax.swing.GroupLayout(addHolidayPanel);
        addHolidayPanel.setLayout(addHolidayPanelLayout);
        addHolidayPanelLayout.setHorizontalGroup(
            addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(addHolidayTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(addHolidayPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(addHolidayPanelLayout.createSequentialGroup()
                        .addGroup(addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbAddEmployeeName4)
                            .addComponent(lbasdasdwda)
                            .addComponent(lbAddEmployeeName12))
                        .addGap(18, 18, 18)
                        .addGroup(addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtHolidayDescription)
                            .addGroup(addHolidayPanelLayout.createSequentialGroup()
                                .addGroup(addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(dateChooseStartHoliday, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE)
                                    .addComponent(dateChooseEndHoliday, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGap(0, 124, Short.MAX_VALUE))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addHolidayPanelLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnSubmitHoliday)))
                .addContainerGap())
        );
        addHolidayPanelLayout.setVerticalGroup(
            addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addHolidayPanelLayout.createSequentialGroup()
                .addComponent(addHolidayTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbAddEmployeeName4)
                    .addComponent(txtHolidayDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbasdasdwda)
                    .addComponent(dateChooseStartHoliday, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(addHolidayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbAddEmployeeName12)
                    .addComponent(dateChooseEndHoliday, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnSubmitHoliday)
                .addContainerGap())
        );

        javax.swing.GroupLayout mainAddEmployeeLayout = new javax.swing.GroupLayout(mainAddEmployee);
        mainAddEmployee.setLayout(mainAddEmployeeLayout);
        mainAddEmployeeLayout.setHorizontalGroup(
            mainAddEmployeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainAddEmployeeLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(addEmployeePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(addHolidayPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        mainAddEmployeeLayout.setVerticalGroup(
            mainAddEmployeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainAddEmployeeLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(mainAddEmployeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(addHolidayPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(addEmployeePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        mainPanel.add(mainAddEmployee, "card8");

        mainReport.setBackground(new java.awt.Color(255, 255, 255));

        configTitleBar1.setBackground(new java.awt.Color(215, 233, 250));

        jLabel37.setBackground(new java.awt.Color(215, 233, 250));
        jLabel37.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel37.setText("   Leave Report");

        lbReportDepartment.setBackground(new java.awt.Color(215, 233, 250));
        lbReportDepartment.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbReportDepartment.setText("Leave Report");

        lbReportName.setBackground(new java.awt.Color(215, 233, 250));
        lbReportName.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbReportName.setText("Leave Report");

        btnReportBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/back.png"))); // NOI18N
        btnReportBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportBackActionPerformed(evt);
            }
        });

        yearReport.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                yearReportPropertyChange(evt);
            }
        });

        lbReportLevel.setBackground(new java.awt.Color(215, 233, 250));
        lbReportLevel.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbReportLevel.setText("Leave Report");

        btnReportNext.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/next.png"))); // NOI18N
        btnReportNext.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportNextActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout configTitleBar1Layout = new javax.swing.GroupLayout(configTitleBar1);
        configTitleBar1.setLayout(configTitleBar1Layout);
        configTitleBar1Layout.setHorizontalGroup(
            configTitleBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(configTitleBar1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel37)
                .addGap(18, 18, 18)
                .addComponent(yearReport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnReportNext)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 589, Short.MAX_VALUE)
                .addComponent(btnReportBack)
                .addGap(18, 18, 18)
                .addComponent(lbReportName)
                .addGap(18, 18, 18)
                .addComponent(lbReportLevel)
                .addGap(18, 18, 18)
                .addComponent(lbReportDepartment)
                .addContainerGap())
        );
        configTitleBar1Layout.setVerticalGroup(
            configTitleBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, configTitleBar1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(configTitleBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnReportBack)
                    .addGroup(configTitleBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lbReportName)
                        .addComponent(lbReportDepartment)
                        .addComponent(lbReportLevel))
                    .addGroup(configTitleBar1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(yearReport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel37))
                    .addComponent(btnReportNext))
                .addContainerGap())
        );

        tableReport.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableReport.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableReportMouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(tableReport);

        mainReportPayingLabel.setBackground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout mainReportLayout = new javax.swing.GroupLayout(mainReport);
        mainReport.setLayout(mainReportLayout);
        mainReportLayout.setHorizontalGroup(
            mainReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainReportLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(mainReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(configTitleBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane5)
                    .addComponent(mainReportPayingLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        mainReportLayout.setVerticalGroup(
            mainReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainReportLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(configTitleBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 397, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(mainReportPayingLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        mainPanel.add(mainReport, "card9");

        mainApproveLeave.setBackground(new java.awt.Color(215, 233, 250));

        mainInfoApproveLeave.setBackground(new java.awt.Color(255, 255, 255));

        jLabel21.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel21.setText("Full Name :");

        jLabel23.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel23.setText("Telephone Number :");

        jLabel24.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel24.setText("Address :");

        jLabel25.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel25.setText("Department :");

        ApproveLeaveTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        jLabel26.setBackground(new java.awt.Color(215, 233, 250));
        jLabel26.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel26.setText("Infomation :");

        javax.swing.GroupLayout ApproveLeaveTitleBarLayout = new javax.swing.GroupLayout(ApproveLeaveTitleBar);
        ApproveLeaveTitleBar.setLayout(ApproveLeaveTitleBarLayout);
        ApproveLeaveTitleBarLayout.setHorizontalGroup(
            ApproveLeaveTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ApproveLeaveTitleBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        ApproveLeaveTitleBarLayout.setVerticalGroup(
            ApproveLeaveTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ApproveLeaveTitleBarLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel26))
        );

        jLabel27.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel27.setText("OrganizationLevel :");

        lbApproveName.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbApproveName.setText("a");

        lbApproveTelephone.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        lbApproveTelephone.setText("a");

        lbApproveAddress.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        lbApproveAddress.setText("a");

        lbApproveDepartment.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbApproveDepartment.setText("a");

        lbApproveLevel.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbApproveLevel.setText("a");

        btnApproveCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancelApprovide.png"))); // NOI18N
        btnApproveCancel.setToolTipText("Cancel");
        btnApproveCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnApproveCancelActionPerformed(evt);
            }
        });

        btnApprove.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/submitApprovide.png"))); // NOI18N
        btnApprove.setToolTipText("Approve");
        btnApprove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnApproveActionPerformed(evt);
            }
        });

        jLabel54.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel54.setText("Warning in day :");

        lbApproveWarning.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        lbApproveWarning.setText("a");

        javax.swing.GroupLayout mainInfoApproveLeaveLayout = new javax.swing.GroupLayout(mainInfoApproveLeave);
        mainInfoApproveLeave.setLayout(mainInfoApproveLeaveLayout);
        mainInfoApproveLeaveLayout.setHorizontalGroup(
            mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(ApproveLeaveTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainInfoApproveLeaveLayout.createSequentialGroup()
                .addContainerGap(263, Short.MAX_VALUE)
                .addComponent(btnApprove)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnApproveCancel)
                .addGap(13, 13, 13))
            .addGroup(mainInfoApproveLeaveLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addComponent(jLabel23)
                    .addComponent(jLabel24)
                    .addComponent(jLabel25)
                    .addComponent(jLabel27)
                    .addComponent(jLabel54))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lbApproveWarning, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)
                    .addComponent(lbApproveLevel, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)
                    .addComponent(lbApproveDepartment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lbApproveAddress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lbApproveTelephone, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lbApproveName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        mainInfoApproveLeaveLayout.setVerticalGroup(
            mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainInfoApproveLeaveLayout.createSequentialGroup()
                .addComponent(ApproveLeaveTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(lbApproveName))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(lbApproveTelephone))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(lbApproveAddress))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(lbApproveDepartment))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(lbApproveLevel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel54)
                    .addComponent(lbApproveWarning))
                .addGap(18, 18, 18)
                .addGroup(mainInfoApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnApprove)
                    .addComponent(btnApproveCancel))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        mainTableApproveLeave.setBackground(new java.awt.Color(255, 255, 255));

        TableApproveLeave.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        TableApproveLeave.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TableApproveLeaveMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(TableApproveLeave);

        TableApproveLeaveTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        jLabel29.setBackground(new java.awt.Color(215, 233, 250));
        jLabel29.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel29.setText("Request leave :");

        javax.swing.GroupLayout TableApproveLeaveTitleBarLayout = new javax.swing.GroupLayout(TableApproveLeaveTitleBar);
        TableApproveLeaveTitleBar.setLayout(TableApproveLeaveTitleBarLayout);
        TableApproveLeaveTitleBarLayout.setHorizontalGroup(
            TableApproveLeaveTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TableApproveLeaveTitleBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        TableApproveLeaveTitleBarLayout.setVerticalGroup(
            TableApproveLeaveTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TableApproveLeaveTitleBarLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel29))
        );

        javax.swing.GroupLayout mainTableApproveLeaveLayout = new javax.swing.GroupLayout(mainTableApproveLeave);
        mainTableApproveLeave.setLayout(mainTableApproveLeaveLayout);
        mainTableApproveLeaveLayout.setHorizontalGroup(
            mainTableApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 812, Short.MAX_VALUE)
            .addComponent(TableApproveLeaveTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        mainTableApproveLeaveLayout.setVerticalGroup(
            mainTableApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainTableApproveLeaveLayout.createSequentialGroup()
                .addComponent(TableApproveLeaveTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout mainApproveLeaveLayout = new javax.swing.GroupLayout(mainApproveLeave);
        mainApproveLeave.setLayout(mainApproveLeaveLayout);
        mainApproveLeaveLayout.setHorizontalGroup(
            mainApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainApproveLeaveLayout.createSequentialGroup()
                .addComponent(mainTableApproveLeave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(mainInfoApproveLeave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        mainApproveLeaveLayout.setVerticalGroup(
            mainApproveLeaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainInfoApproveLeave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(mainTableApproveLeave, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        mainPanel.add(mainApproveLeave, "card10");

        javax.swing.GroupLayout tabContentLayout = new javax.swing.GroupLayout(tabContent);
        tabContent.setLayout(tabContentLayout);
        tabContentLayout.setHorizontalGroup(
            tabContentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(toolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        tabContentLayout.setVerticalGroup(
            tabContentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tabContentLayout.createSequentialGroup()
                .addComponent(toolbar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE))
        );

        tabbedPane_content.addTab("Admin", tabContent);

        javax.swing.GroupLayout panelIndexLayout = new javax.swing.GroupLayout(panelIndex);
        panelIndex.setLayout(panelIndexLayout);
        panelIndexLayout.setHorizontalGroup(
            panelIndexLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(menuPanel_header, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(tabbedPane_content)
        );
        panelIndexLayout.setVerticalGroup(
            panelIndexLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelIndexLayout.createSequentialGroup()
                .addComponent(menuPanel_header, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tabbedPane_content))
        );

        getContentPane().add(panelIndex, "card3");

        panelConfig.setBackground(new java.awt.Color(255, 255, 255));
        panelConfig.setMaximumSize(new java.awt.Dimension(459, 235));
        panelConfig.setMinimumSize(new java.awt.Dimension(459, 235));

        configTitleBar.setBackground(new java.awt.Color(215, 233, 250));

        jLabel32.setBackground(new java.awt.Color(215, 233, 250));
        jLabel32.setFont(new java.awt.Font("Candara", 1, 20)); // NOI18N
        jLabel32.setText("Config database :");

        javax.swing.GroupLayout configTitleBarLayout = new javax.swing.GroupLayout(configTitleBar);
        configTitleBar.setLayout(configTitleBarLayout);
        configTitleBarLayout.setHorizontalGroup(
            configTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(configTitleBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, 935, Short.MAX_VALUE)
                .addGap(296, 296, 296))
        );
        configTitleBarLayout.setVerticalGroup(
            configTitleBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, configTitleBarLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel32))
        );

        jLabel33.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel33.setText("IP address :");

        jLabel34.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel34.setText("User name :");

        jLabel35.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel35.setText("Password :");

        txtDBPort.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
        txtDBPort.setOpaque(false);

        txtDBUserName.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
        txtDBUserName.setOpaque(false);
        txtDBUserName.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtDBUserNameKeyPressed(evt);
            }
        });

        txtDBPass.setText("jPasswordField1");
        txtDBPass.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtDBPassMouseClicked(evt);
            }
        });

        jLabel36.setFont(new java.awt.Font("Candara", 1, 14)); // NOI18N
        jLabel36.setText("Port :");

        txtDBIPaddress.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
        txtDBIPaddress.setOpaque(false);

        btnDBSubmit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/submit.png"))); // NOI18N
        btnDBSubmit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnDBSubmit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDBSubmitActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelConfigLayout = new javax.swing.GroupLayout(panelConfig);
        panelConfig.setLayout(panelConfigLayout);
        panelConfigLayout.setHorizontalGroup(
            panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelConfigLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(configTitleBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(panelConfigLayout.createSequentialGroup()
                .addGap(43, 43, 43)
                .addGroup(panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnDBSubmit, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(panelConfigLayout.createSequentialGroup()
                        .addGroup(panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(panelConfigLayout.createSequentialGroup()
                                .addGap(2, 2, 2)
                                .addComponent(jLabel33)
                                .addGap(18, 18, 18))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelConfigLayout.createSequentialGroup()
                                .addGroup(panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel34, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel35, javax.swing.GroupLayout.Alignment.LEADING))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addGroup(panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtDBUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
                            .addComponent(txtDBPass)
                            .addComponent(txtDBIPaddress))))
                .addGap(42, 42, 42)
                .addComponent(jLabel36)
                .addGap(18, 18, 18)
                .addComponent(txtDBPort, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelConfigLayout.setVerticalGroup(
            panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelConfigLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(configTitleBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel33, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtDBIPaddress, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel36)
                        .addComponent(txtDBPort, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(33, 33, 33)
                .addGroup(panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtDBUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34))
                .addGap(33, 33, 33)
                .addGroup(panelConfigLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtDBPass, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35))
                .addGap(60, 60, 60)
                .addComponent(btnDBSubmit)
                .addContainerGap(294, Short.MAX_VALUE))
        );

        getContentPane().add(panelConfig, "card4");

        MenuBar.setBackground(new java.awt.Color(0, 0, 0));

        jMenu1.setText("File");

        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem2.setText("Logout");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem1.setText("Exit");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        MenuBar.add(jMenu1);

        jMenu2.setText("Edit");

        itemFind.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
        itemFind.setText("Find");
        itemFind.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemFindActionPerformed(evt);
            }
        });
        jMenu2.add(itemFind);

        MenuBar.add(jMenu2);

        menuInfo.setText("Infomation");

        changePassword.setText("Change password");
        changePassword.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                changePasswordActionPerformed(evt);
            }
        });
        menuInfo.add(changePassword);

        itemAdd.setText("Add");
        itemAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemAddActionPerformed(evt);
            }
        });
        menuInfo.add(itemAdd);

        MenuBar.add(menuInfo);

        menuLeave.setText("Leave management");

        itemHistory.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
        itemHistory.setText("Leaves History");
        itemHistory.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemHistoryActionPerformed(evt);
            }
        });
        menuLeave.add(itemHistory);

        itemApprove.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
        itemApprove.setText("Approve Leaves");
        itemApprove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemApproveActionPerformed(evt);
            }
        });
        menuLeave.add(itemApprove);

        itemCancel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
        itemCancel.setText("Cancel Leaves");
        itemCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemCancelActionPerformed(evt);
            }
        });
        menuLeave.add(itemCancel);

        itemApply.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        itemApply.setText("Apply Leaves");
        itemApply.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemApplyActionPerformed(evt);
            }
        });
        menuLeave.add(itemApply);

        itemReport.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));
        itemReport.setText("Report");
        itemReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemReportActionPerformed(evt);
            }
        });
        menuLeave.add(itemReport);

        MenuBar.add(menuLeave);

        menuHelp.setText("Help");

        About.setText("About");
        About.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AboutActionPerformed(evt);
            }
        });
        menuHelp.add(About);

        MenuBar.add(menuHelp);

        setJMenuBar(MenuBar);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void txt_passMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txt_passMouseClicked
        txt_pass.setText(null);
    }//GEN-LAST:event_txt_passMouseClicked

    private void panel_LoginKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_panel_LoginKeyPressed
    }//GEN-LAST:event_panel_LoginKeyPressed

    private void btn_LoginOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_LoginOkActionPerformed
        loginApp();
    }//GEN-LAST:event_btn_LoginOkActionPerformed

    private void btnHomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHomeActionPerformed
        resetMain();
        mainHomePanel.setVisible(true);
        setHomeBar();
        homeCalendar.getDayChooser().addDateEvaluator(new DateEvaluator(request.getListHoliday()));
    }//GEN-LAST:event_btnHomeActionPerformed

    private void txtSearchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtSearchMouseClicked
        txtSearch.setText(null);
    }//GEN-LAST:event_txtSearchMouseClicked

    private void btnApplyLeaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnApplyLeaveActionPerformed
        resetMain();
        mainApplyPanel.setVisible(true);
        setSummary();
        applyCalendar.getDayChooser().addDateEvaluator(new DateEvaluator(request.getListHoliday()));
    }//GEN-LAST:event_btnApplyLeaveActionPerformed

    private void btnSubmitApplyLeaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSubmitApplyLeaveActionPerformed
        Calendar cal = Calendar.getInstance();
        int year = cal.get(Calendar.YEAR);
        int month = cal.get(Calendar.MONTH) + 1;
        int date = cal.get(Calendar.DAY_OF_MONTH);
        if (comboBoxLeaveType.getSelectedIndex() == -1 || dateChooserStartDate.getDate() == null || dateChooserFinishDate.getDate() == null) {
            JOptionPane.showMessageDialog(this, "Please enter all required fields to continue.", "Error", JOptionPane.ERROR_MESSAGE);
        } else if (dateChooserStartDate.getDate().getTime() < cal.getTime().getTime() || dateChooserFinishDate.getDate().getTime() < cal.getTime().getTime()) {
            JOptionPane.showMessageDialog(this, "Leave date do not smaller than today\nToday is " + month + "/" + date + "/" + year + "(MM/DD/YYYY)", "Error", JOptionPane.ERROR_MESSAGE);
        } else if (dateChooserStartDate.getDate().getTime() > dateChooserFinishDate.getDate().getTime()) {
            JOptionPane.showMessageDialog(this, "End date leave do not smaller than Start date leave", "Error", JOptionPane.ERROR_MESSAGE);
        } else if (dateChooserStartDate.getCalendar().get(Calendar.YEAR) == dateChooserFinishDate.getCalendar().get(Calendar.YEAR) && dateChooserStartDate.getCalendar().get(Calendar.MONTH) == dateChooserFinishDate.getCalendar().get(Calendar.MONTH) && dateChooserStartDate.getCalendar().get(Calendar.DAY_OF_MONTH) == dateChooserFinishDate.getCalendar().get(Calendar.DAY_OF_MONTH)) {
            JOptionPane.showMessageDialog(this, "Start date leave do not equal End date leave", "Error", JOptionPane.ERROR_MESSAGE);
        } else {
            switch (employee.getOrganization().getOrganizationLevelID()) {
                case 1:
                    listLeaveDetail = getListLeaveDetail(1);
                    break;
                case 2:
                    listLeaveDetail = getListLeaveDetail(2);
                    break;
            }
            if (employeebuiness.addFormToDB(employee, listLeaveDetail)) {
                JOptionPane.showMessageDialog(this, "Apply success !!", "Success", JOptionPane.INFORMATION_MESSAGE);
            } else {
                JOptionPane.showMessageDialog(this, "Apply unsuccess  !!", "unsuccess", JOptionPane.ERROR_MESSAGE);
            }
            setSummary();
        }
    }//GEN-LAST:event_btnSubmitApplyLeaveActionPerformed

    private void btnApproveLeaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnApproveLeaveActionPerformed
        resetMain();
        mainApproveLeave.setVisible(true);
        setTableApproveModel();
    }//GEN-LAST:event_btnApproveLeaveActionPerformed

    private void TableApproveLeaveMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TableApproveLeaveMouseClicked
        if (TableApproveLeave.getSelectedRow() != -1) {
            LeaveForm form = listForm.get(TableApproveLeave.getSelectedRow());
            lbApproveName.setText(form.getEmployee().getFullName());
            lbApproveTelephone.setText(form.getEmployee().getPhone());
            lbApproveAddress.setText(form.getEmployee().getAddress());
            lbApproveDepartment.setText(form.getEmployee().getDepartment().getName());
            lbApproveLevel.setText(form.getEmployee().getOrganization().getName());
        }
    }//GEN-LAST:event_TableApproveLeaveMouseClicked

    private void btnApproveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnApproveActionPerformed
        if (TableApproveLeave.getSelectedRow() != -1) {
            if (JOptionPane.showConfirmDialog(this, "Do you want approve this!", "Comfirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
                LeaveForm form = listForm.get(TableApproveLeave.getSelectedRow());
                if (employeebuiness.approveLeave(employee, form)) {
                    JOptionPane.showMessageDialog(this, "Approve success!", "Success", JOptionPane.INFORMATION_MESSAGE);
                    setTableApproveModel();
                } else {
                    JOptionPane.showMessageDialog(this, "Approve unsuccess!", "False", JOptionPane.ERROR_MESSAGE);
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "Please choose leave form", "Message", JOptionPane.INFORMATION_MESSAGE);
        }
    }//GEN-LAST:event_btnApproveActionPerformed

    private void btnApproveCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnApproveCancelActionPerformed
        if (TableApproveLeave.getSelectedRow() != -1) {
            if (JOptionPane.showConfirmDialog(this, "Do you want cancel this!", "Comfirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
                LeaveForm form = listForm.get(TableApproveLeave.getSelectedRow());
                String cause = JOptionPane.showInputDialog(this, "Cause to cancel leave : ", "Cause", JOptionPane.INFORMATION_MESSAGE);
                if (employeebuiness.cancelLeaveByForm(form, cause)) {
                    JOptionPane.showMessageDialog(this, "Cancel success!", "Success", JOptionPane.INFORMATION_MESSAGE);
                    setTableApproveModel();
                } else {
                    JOptionPane.showMessageDialog(this, "Cancel unsuccess!", "False", JOptionPane.ERROR_MESSAGE);
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "Please choose leave form", "Message", JOptionPane.INFORMATION_MESSAGE);
        }
    }//GEN-LAST:event_btnApproveCancelActionPerformed

    private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelActionPerformed
        resetMain();
        mainCancelPanel.setVisible(true);
        setModelTableCancelLeave();
    }//GEN-LAST:event_btnCancelActionPerformed

    private void tableCancelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableCancelMouseClicked
        if (tableCancel.getSelectedColumn() == 7) {
            if (JOptionPane.showConfirmDialog(this, "Do you want to cancel leave ?", "Confirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
                if (employeebuiness.cancelLeave(listLeaveDetail.get(tableCancel.getSelectedRow()))) {
                    JOptionPane.showMessageDialog(this, "Cancel success!", "Success", JOptionPane.INFORMATION_MESSAGE);
                    setModelTableCancelLeave();
                } else {
                    JOptionPane.showMessageDialog(this, "Cancel unsuccess!", "False", JOptionPane.ERROR_MESSAGE);
                }
            }
        }
    }//GEN-LAST:event_tableCancelMouseClicked

    private void btnHistoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHistoryActionPerformed
        resetMain();
        mainHistoryPanel.setVisible(true);
        setModelTableHistory();
    }//GEN-LAST:event_btnHistoryActionPerformed

    private void txtDBPassMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtDBPassMouseClicked
        txtDBPass.setText(null);
    }//GEN-LAST:event_txtDBPassMouseClicked

    private void btnDBSubmitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDBSubmitActionPerformed
        File file = new File("config.properties");
        if (file.exists()) {
            file.delete();
        }
        Properties prop = new Properties();
        try {
            prop.setProperty("ip", txtDBIPaddress.getText());
            prop.setProperty("port", txtDBPort.getText());
            prop.setProperty("userName", txtDBUserName.getText());
            prop.setProperty("password", new String(txtDBPass.getPassword()));
            prop.store(new FileOutputStream(file), null);
            if (ConnectDB.testConnect()) {
                JOptionPane.showMessageDialog(this, "Success! Connecting to database", "Success", JOptionPane.INFORMATION_MESSAGE);
                panelConfig.setVisible(false);
                panelBackgroudLogin.setVisible(true);
            } else {
                JOptionPane.showMessageDialog(this, "False connect to database\nPlease check!", "Error", JOptionPane.ERROR_MESSAGE);
                txtDBIPaddress.setText("");
                txtDBPort.setText("");
                txtDBUserName.setText("");
                txtDBPass.setText("123451231236");
            }
        } catch (FileNotFoundException ex) {
            Logger.getLogger(FrameLMS.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(FrameLMS.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnDBSubmitActionPerformed

    private void lbLogoutMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbLogoutMouseClicked
        logout();
    }//GEN-LAST:event_lbLogoutMouseClicked

    private void label_ForgotPassMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_label_ForgotPassMouseClicked
        JOptionPane.showMessageDialog(this, "Features", "Features", JOptionPane.INFORMATION_MESSAGE);
    }//GEN-LAST:event_label_ForgotPassMouseClicked

    private void btnMessageStuffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMessageStuffActionPerformed
        JOptionPane.showMessageDialog(this, "Features", "Features", JOptionPane.INFORMATION_MESSAGE);
    }//GEN-LAST:event_btnMessageStuffActionPerformed

    private void btnReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportActionPerformed
        resetMain();
        mainReport.setVisible(true);
        Calendar cal = Calendar.getInstance();
        yearReport.setYear(cal.get(Calendar.YEAR));
        switch (employee.getOrganization().getOrganizationLevelID()) {
            case 0:
            case 1:
                setModelTableReportT1();
                break;
            case 2:
                setModelTableReportT2(employee);
                btnReportBack.setVisible(false);
                break;
        }
    }//GEN-LAST:event_btnReportActionPerformed

    private void tableReportMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableReportMouseClicked
        if (tableReport.getSelectedColumn() == 5) {
            listEmployee.set(0, listEmployee.get(tableReport.getSelectedRow()));
            setModelTableReportT2(listEmployee.get(tableReport.getSelectedRow()));
        }
    }//GEN-LAST:event_tableReportMouseClicked

    private void btnReportBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportBackActionPerformed
        setModelTableReportT1();
    }//GEN-LAST:event_btnReportBackActionPerformed

    private void yearReportPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_yearReportPropertyChange
    }//GEN-LAST:event_yearReportPropertyChange

    private void passNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_passNewActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_passNewActionPerformed

    private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed
        // TODO add your handling code here:
        getChangePassword();
    }//GEN-LAST:event_btnSaveActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        pass1.setText(null);
        passNew.setText(null);
        passConfirm.setText(null);
    }//GEN-LAST:event_jButton2ActionPerformed

    private void btnInfoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnInfoActionPerformed
        // TODO add your handling code here:
        resetMain();
        mainInfoPanel.setVisible(true);
        getInformation();
        palChangeif.setVisible(false);
    }//GEN-LAST:event_btnInfoActionPerformed

    private void btnReportNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportNextActionPerformed
        switch (employee.getOrganization().getOrganizationLevelID()) {
            case 0:
            case 1:
                if (tableReport.getModel() instanceof ModelTableReportManager) {
                    setModelTableReportT1();
                } else {
                    setModelTableReportT2(listEmployee.get(0));
                }
                break;
            case 2:
                setModelTableReportT2(employee);
                break;
        }
    }//GEN-LAST:event_btnReportNextActionPerformed

    private void cbAddDepartmentNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbAddDepartmentNameActionPerformed
    }//GEN-LAST:event_cbAddDepartmentNameActionPerformed

    private void txtAddLoginIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAddLoginIDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAddLoginIDActionPerformed

    private void rbMaleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbMaleActionPerformed
        gender = "M";
    }//GEN-LAST:event_rbMaleActionPerformed

    private void txtAddAddressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAddAddressActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAddAddressActionPerformed

    private void txtAddFullNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAddFullNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAddFullNameActionPerformed

    private void btnSubmitAddEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSubmitAddEmployeeActionPerformed
        String pass1 = new String(addPassword.getPassword());
        String pass2 = new String(addRePassword.getPassword());
        if (txtAddFullName.getText().equals("") || dateChooserAddBirthday.getDate() == null || txtAddTelephoneNumber.getText().equals("") || txtAddAddress.getText().equals("") || txtAddLoginID.getText().equals("") || addPassword.getPassword() == null || addRePassword.getPassword() == null || cbAddDepartmentName.getSelectedIndex() == -1 || cbAddOrganizationLevel.getSelectedIndex() == -1 || (!rbMale.isSelected()) && (!rbFemale.isSelected())) {
            JOptionPane.showMessageDialog(this, "Please enter all required fields to continue.", "Error", JOptionPane.ERROR_MESSAGE);
        } else if (txtAddTelephoneNumber.getValue() == null) {
            resetAddError();
            addLabelTelephoneError.setVisible(true);
            addLabelTelephoneError.setText("* Telephone must number");
        } else if (txtAddTelephoneNumber.getText().length() > 14) {
            resetAddError();
            addLabelTelephoneError.setVisible(true);
            addLabelTelephoneError.setText("* Telephone number must 14< character");
        } else if (txtAddLoginID.getText().length() > 12) {
            resetAddError();
            addLabelLoginError.setVisible(true);
        } else if (addPassword.getPassword().length > 20) {
            resetAddError();
            addLabelPassError.setVisible(true);
        } else if (!pass1.equals(pass2)) {
            resetAddError();
            addLabelPassError1.setVisible(true);
        } else {
            resetAddError();
            Department department = (Department) cbAddDepartmentName.getSelectedItem();
            OrganizationLevel level = (OrganizationLevel) cbAddOrganizationLevel.getSelectedItem();
            Employee em;
            if ((department.getDepartmentID().equals("ADM") || department.getDepartmentID().equals("CEO")) && (level.getOrganizationLevelID() == 1 || level.getOrganizationLevelID() == 2)) {
                JOptionPane.showMessageDialog(this, "'Department' is 'Admin' or 'Chief Officer' can not level is 'Manager' or 'Stuff'", "Attention", JOptionPane.WARNING_MESSAGE);
            } else if ((level.getOrganizationLevelID() == 0 && department.getDepartmentID().equals("ADM")) || department.getDepartmentID().equals("CEO")) {
                JOptionPane.showMessageDialog(this, "'Level' is 'Managing Director & Admin' must be department is 'Admin' or 'Chief Officer'", "Attention", JOptionPane.WARNING_MESSAGE);
            } else {
                String telephone = "0" + txtAddTelephoneNumber.getText();
                em = new Employee();
                em.setFullName(txtAddFullName.getText());
                em.setAddress(txtAddAddress.getText());
                em.setBirthday(dateChooserAddBirthday.getDate());
                em.setGender(gender);
                em.setPhone(telephone);
                em.setDepartment(department);
                em.setOrganization(level);
                Account account = new Account();
                account.setLoginID(txtAddLoginID.getText());
                account.setPassword(new String(addPassword.getPassword()));
                em.setAccount(account);
                if (employeebuiness.addEmployee(em)) {
                    JOptionPane.showMessageDialog(this, "Add employee is Success", "Success", JOptionPane.INFORMATION_MESSAGE);
                    resetAddError();
                    txtAddFullName.setText("");
                    txtAddAddress.setText("");
                    txtAddTelephoneNumber.setText("");
                    txtAddLoginID.setText("");
                    addPassword.setText("asdasdasd");
                    addRePassword.setText("asdasdqwe");
                    cbAddDepartmentName.setSelectedIndex(-1);
                    cbAddOrganizationLevel.setSelectedIndex(-1);
                } else {
                    JOptionPane.showMessageDialog(this, "Add employee is Faluse", "Faluse", JOptionPane.ERROR_MESSAGE);
                    txtAddFullName.setText("");
                    txtAddAddress.setText("");
                    txtAddTelephoneNumber.setText("");
                    txtAddLoginID.setText("");
                    addPassword.setText("asdasdasd");
                    addRePassword.setText("asdasdqwe");
                    cbAddDepartmentName.setSelectedIndex(-1);
                    cbAddOrganizationLevel.setSelectedIndex(-1);
                }
            }
        }
    }//GEN-LAST:event_btnSubmitAddEmployeeActionPerformed

    private void btnSubmitHolidayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSubmitHolidayActionPerformed
        // TODO add your handling code here:
        if (dateChooseStartHoliday.getDate().getTime() > dateChooseEndHoliday.getDate().getTime()) {
            JOptionPane.showMessageDialog(this, "End date leave do not smaller than Start date leave", "Error", JOptionPane.ERROR_MESSAGE);
        } else {
            listHolidayDetail = getListHoliday();
            Holiday holiday = new Holiday();
            holiday.setList(listHolidayDetail);
            holiday.setDescription(txtHolidayDescription.getText());
            if (employeebuiness.addHoliday(holiday)) {
                JOptionPane.showMessageDialog(this, "Add holiday is Success", "Success", JOptionPane.INFORMATION_MESSAGE);
                txtHolidayDescription.setText("");
            } else {
                JOptionPane.showMessageDialog(this, "Add holiday is Faluse", "Faluse", JOptionPane.ERROR_MESSAGE);
            }
        }
    }//GEN-LAST:event_btnSubmitHolidayActionPerformed

    private void btnResetAddEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResetAddEmployeeActionPerformed
    }//GEN-LAST:event_btnResetAddEmployeeActionPerformed

    private void rbFemaleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbFemaleActionPerformed
        gender = "F";
    }//GEN-LAST:event_rbFemaleActionPerformed

    private void addPasswordMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addPasswordMouseClicked
        addPassword.setText("");
    }//GEN-LAST:event_addPasswordMouseClicked

    private void addRePasswordMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addRePasswordMouseClicked
        addRePassword.setText("");
    }//GEN-LAST:event_addRePasswordMouseClicked

    private void txt_UsernameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_UsernameKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            btn_LoginOk.doClick();
        }
    }//GEN-LAST:event_txt_UsernameKeyPressed

    private void txtDBUserNameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtDBUserNameKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            btnDBSubmit.doClick();
        }
    }//GEN-LAST:event_txtDBUserNameKeyPressed

    private void btnFormCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFormCancelActionPerformed
        comboBoxLeaveType.setSelectedItem(-1);
        txtAreaReson.setText("");
        resetMain();
        mainHomePanel.setVisible(true);
    }//GEN-LAST:event_btnFormCancelActionPerformed

    private void txt_passFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txt_passFocusGained
        txt_pass.setText(null);
    }//GEN-LAST:event_txt_passFocusGained

    private void addPasswordFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_addPasswordFocusGained
        addPassword.setText(null);
    }//GEN-LAST:event_addPasswordFocusGained

    private void addRePasswordFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_addRePasswordFocusGained
        addRePassword.setText(null);
    }//GEN-LAST:event_addRePasswordFocusGained

    private void btnAddEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddEmployeeActionPerformed
        resetMain();
        mainAddEmployee.setVisible(true);
        listDepartment = request.getListDepartment();
        listOrganization = request.getListOrganizationLevel();
        cbAddDepartmentName.setModel(new ModelComboBox(listDepartment));
        cbAddOrganizationLevel.setModel(new ModelComboBox(listOrganization));
    }//GEN-LAST:event_btnAddEmployeeActionPerformed

    private void lbWelcomeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbWelcomeMouseClicked
        btnInfo.doClick();
    }//GEN-LAST:event_lbWelcomeMouseClicked

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        if (JOptionPane.showConfirmDialog(this, "Do you want to exit ?", "Exit", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
            System.exit(EXIT_ON_CLOSE);
        }
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void changePasswordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_changePasswordActionPerformed
        btnInfo.doClick();
    }//GEN-LAST:event_changePasswordActionPerformed

    private void itemAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemAddActionPerformed
        btnAddEmployee.doClick();
    }//GEN-LAST:event_itemAddActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        logout();
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void itemHistoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemHistoryActionPerformed
        btnHistory.doClick();
    }//GEN-LAST:event_itemHistoryActionPerformed

    private void itemApproveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemApproveActionPerformed
        btnApproveLeave.doClick();
    }//GEN-LAST:event_itemApproveActionPerformed

    private void itemCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemCancelActionPerformed
        btnCancel.doClick();
    }//GEN-LAST:event_itemCancelActionPerformed

    private void itemApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemApplyActionPerformed
        btnApplyLeave.doClick();
    }//GEN-LAST:event_itemApplyActionPerformed

    private void itemReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemReportActionPerformed
        btnReport.doClick();
    }//GEN-LAST:event_itemReportActionPerformed

    private void itemFindActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemFindActionPerformed
        JOptionPane.showConfirmDialog(this, "Feature", "Feature is update late", JOptionPane.INFORMATION_MESSAGE);
    }//GEN-LAST:event_itemFindActionPerformed

    private void AboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AboutActionPerformed
        JOptionPane.showMessageDialog(this, "e-Project : Leave Management System\n"
                                           +"###2013-08-10###\n"
                                           +"Group   : Fat1-T3\n"
                                           +"School  : FPT-Aptech\n"
                                           +"Contact : chinhnk_a05221@fpt.aptech.ac.vn", "About", JOptionPane.INFORMATION_MESSAGE);
    }//GEN-LAST:event_AboutActionPerformed

    private void lbSearchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbSearchMouseClicked
        JOptionPane.showConfirmDialog(this, "Feature", "Feature is update late", JOptionPane.INFORMATION_MESSAGE);
    }//GEN-LAST:event_lbSearchMouseClicked

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        if (txtAddress.getText().equals("") || txtNumber.getText().equals("")) {
            lblLoi.setVisible(true);
            lblLoi.setText("Please retype in both boxes");
        } else {
            changeinfo();
            lblLoi.setVisible(false);
            palChangeif.setVisible(false);
            JOptionPane.showMessageDialog(this, "Change information is success", "Success", JOptionPane.INFORMATION_MESSAGE);
            getInformation();
        }
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        palChangeif.setVisible(false);
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        palChangeif.setVisible(true);
        lblLoi.setVisible(false);
    }//GEN-LAST:event_jButton1ActionPerformed
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            /* Set the Nimbus look and feel */
            //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
            /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
             * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
             */
            UIManager.setLookAndFeel(new com.jtattoo.plaf.acryl.AcrylLookAndFeel());
            //</editor-fold>
        } catch (Exception e) {
            Logger.getLogger(FrameLMS.class
                    .getName()).log(Level.SEVERE, null, e);
        }
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new FrameLMS().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem About;
    private javax.swing.JPanel ApproveLeaveTitleBar;
    private javax.swing.JMenuBar MenuBar;
    private javax.swing.JTable TableApproveLeave;
    private javax.swing.JPanel TableApproveLeaveTitleBar;
    private javax.swing.JPanel addEmployeePanel;
    private javax.swing.JPanel addEmployeeTitleBar;
    private javax.swing.JPanel addHolidayPanel;
    private javax.swing.JPanel addHolidayTitleBar;
    private javax.swing.JLabel addLabelLoginError;
    private javax.swing.JLabel addLabelPassError;
    private javax.swing.JLabel addLabelPassError1;
    private javax.swing.JLabel addLabelTelephoneError;
    private javax.swing.JPasswordField addPassword;
    private javax.swing.JPasswordField addRePassword;
    private com.toedter.calendar.JCalendar applyCalendar;
    private javax.swing.JButton btnAddEmployee;
    private javax.swing.JButton btnApplyLeave;
    private javax.swing.JButton btnApprove;
    private javax.swing.JButton btnApproveCancel;
    private javax.swing.JButton btnApproveLeave;
    private javax.swing.JButton btnCancel;
    private javax.swing.JButton btnDBSubmit;
    private javax.swing.JButton btnFormCancel;
    private javax.swing.JButton btnHistory;
    private javax.swing.JButton btnHome;
    private javax.swing.JButton btnInfo;
    private javax.swing.JButton btnMessageStuff;
    private javax.swing.JButton btnReport;
    private javax.swing.JButton btnReportBack;
    private javax.swing.JButton btnReportNext;
    private javax.swing.JButton btnResetAddEmployee;
    private javax.swing.JButton btnSave;
    private javax.swing.JButton btnSubmitAddEmployee;
    private javax.swing.JButton btnSubmitApplyLeave;
    private javax.swing.JButton btnSubmitHoliday;
    private javax.swing.JButton btn_LoginOk;
    private javax.swing.JComboBox cbAddDepartmentName;
    private javax.swing.JComboBox cbAddOrganizationLevel;
    private javax.swing.JMenuItem changePassword;
    private javax.swing.JComboBox comboBoxLeaveType;
    private javax.swing.JPanel configTitleBar;
    private javax.swing.JPanel configTitleBar1;
    private com.toedter.calendar.JDateChooser dateChooseEndHoliday;
    private com.toedter.calendar.JDateChooser dateChooseStartHoliday;
    private com.toedter.calendar.JDateChooser dateChooserAddBirthday;
    private com.toedter.calendar.JDateChooser dateChooserFinishDate;
    private com.toedter.calendar.JDateChooser dateChooserStartDate;
    private javax.swing.ButtonGroup groupGender;
    private javax.swing.JProgressBar homeBarAnnual;
    private javax.swing.JProgressBar homeBarMedical;
    private com.toedter.calendar.JCalendar homeCalendar;
    private javax.swing.JMenuItem itemAdd;
    private javax.swing.JMenuItem itemApply;
    private javax.swing.JMenuItem itemApprove;
    private javax.swing.JMenuItem itemCancel;
    private javax.swing.JMenuItem itemFind;
    private javax.swing.JMenuItem itemHistory;
    private javax.swing.JMenuItem itemReport;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JLabel label_ForgotPass;
    private javax.swing.JLabel lbAddEmployeeName;
    private javax.swing.JLabel lbAddEmployeeName1;
    private javax.swing.JLabel lbAddEmployeeName10;
    private javax.swing.JLabel lbAddEmployeeName12;
    private javax.swing.JLabel lbAddEmployeeName2;
    private javax.swing.JLabel lbAddEmployeeName3;
    private javax.swing.JLabel lbAddEmployeeName4;
    private javax.swing.JLabel lbAddEmployeeName5;
    private javax.swing.JLabel lbAddEmployeeName6;
    private javax.swing.JLabel lbAddEmployeeName7;
    private javax.swing.JLabel lbAddEmployeeName8;
    private javax.swing.JLabel lbAddEmployeeName9;
    private javax.swing.JLabel lbAddEmployeeTitle;
    private javax.swing.JLabel lbAddEmployeeTitle1;
    private javax.swing.JLabel lbAddEmployeeTitle2;
    private javax.swing.JLabel lbAddEmployeeTitle3;
    private javax.swing.JLabel lbAnnualLeaveBanlance;
    private javax.swing.JLabel lbAnnualLeavePending;
    private javax.swing.JLabel lbAnnualLeaveQuatity;
    private javax.swing.JLabel lbAnnualLeaveTaken;
    private javax.swing.JLabel lbApproveAddress;
    private javax.swing.JLabel lbApproveDepartment;
    private javax.swing.JLabel lbApproveLevel;
    private javax.swing.JLabel lbApproveName;
    private javax.swing.JLabel lbApproveTelephone;
    private javax.swing.JLabel lbApproveWarning;
    private javax.swing.JLabel lbLogout;
    private javax.swing.JLabel lbMedicalLeaveBanlance;
    private javax.swing.JLabel lbMedicalLeavePending;
    private javax.swing.JLabel lbMedicalLeaveQuatity;
    private javax.swing.JLabel lbMedicalLeaveTaken;
    private javax.swing.JLabel lbReportDepartment;
    private javax.swing.JLabel lbReportLevel;
    private javax.swing.JLabel lbReportName;
    private javax.swing.JLabel lbSearch;
    private javax.swing.JLabel lbWelcome;
    private javax.swing.JLabel lbasdasdwda;
    private javax.swing.JLabel lblAddress;
    private javax.swing.JLabel lblBirthday;
    private javax.swing.JLabel lblDepartment;
    private javax.swing.JLabel lblErroChangePass;
    private javax.swing.JLabel lblFullName;
    private javax.swing.JLabel lblGender;
    private javax.swing.JLabel lblLevel;
    private javax.swing.JLabel lblLoi;
    private javax.swing.JLabel lblPhoneNumber;
    private javax.swing.JPanel leaveForm;
    private javax.swing.JPanel leaveHistoryTitleBar;
    private javax.swing.JPanel leaveSummaryPanel;
    private javax.swing.JPanel leaveSummaryTitleBar;
    private javax.swing.JPanel leaveSummaryTitleBar1;
    private javax.swing.JPanel mainAddEmployee;
    private javax.swing.JPanel mainApplyCalendarPanel;
    private javax.swing.JPanel mainApplyPanel;
    private javax.swing.JPanel mainApproveLeave;
    private javax.swing.JPanel mainCancelPanel;
    private javax.swing.JPanel mainHistoryPagingLabel;
    private javax.swing.JPanel mainHistoryPanel;
    private javax.swing.JPanel mainHomeCalendar;
    private javax.swing.JPanel mainHomePanel;
    private javax.swing.JPanel mainHomeStatus;
    private javax.swing.JPanel mainInfoApproveLeave;
    private javax.swing.JPanel mainInfoPanel;
    private javax.swing.JPanel mainMessagePanel;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JPanel mainReport;
    private javax.swing.JPanel mainReportPayingLabel;
    private javax.swing.JPanel mainTableApproveLeave;
    private javax.swing.JMenu menuHelp;
    private javax.swing.JMenu menuInfo;
    private javax.swing.JMenu menuLeave;
    private javax.swing.JPanel menuPanel_header;
    private javax.swing.JPanel messagesPanel;
    private javax.swing.JPanel palChangeif;
    private javax.swing.JPanel palInformation;
    private javax.swing.JPanel panelBackgroudLogin;
    private javax.swing.JPanel panelConfig;
    private javax.swing.JPanel panelIndex;
    private javax.swing.JPanel panel_Login;
    private javax.swing.JPasswordField pass1;
    private javax.swing.JPasswordField passConfirm;
    private javax.swing.JPasswordField passNew;
    private javax.swing.JRadioButton rbFemale;
    private javax.swing.JRadioButton rbMale;
    private javax.swing.JPanel tabContent;
    private javax.swing.JTabbedPane tabbedPane_content;
    private javax.swing.JTable tableCancel;
    private javax.swing.JPanel tableCancelTitleBar;
    private javax.swing.JTable tableHistory;
    private javax.swing.JTable tableReport;
    private javax.swing.JPanel toolHomePanel;
    private javax.swing.JPanel toolInfoPanel;
    private javax.swing.JPanel toolLeavePanel;
    private javax.swing.JPanel toolbar;
    private javax.swing.JTextField txtAddAddress;
    private javax.swing.JTextField txtAddFullName;
    private javax.swing.JTextField txtAddLoginID;
    private javax.swing.JFormattedTextField txtAddTelephoneNumber;
    private javax.swing.JTextField txtAddress;
    private javax.swing.JTextArea txtAreaReson;
    private javax.swing.JTextField txtDBIPaddress;
    private javax.swing.JPasswordField txtDBPass;
    private javax.swing.JTextField txtDBPort;
    private javax.swing.JTextField txtDBUserName;
    private javax.swing.JTextField txtHolidayDescription;
    private javax.swing.JTextField txtNumber;
    private javax.swing.JTextField txtSearch;
    private javax.swing.JTextField txt_Username;
    private javax.swing.JPasswordField txt_pass;
    private com.toedter.calendar.JYearChooser yearReport;
    // End of variables declaration//GEN-END:variables

    private void loginApp() throws HeadlessException {
        if (txt_Username.getText().equals("") || (new String(txt_pass.getPassword())).equals("")) {
            JOptionPane.showMessageDialog(this, "You have not specified a valid user name.", "Login error", JOptionPane.ERROR_MESSAGE);
        } else {
            String id = txt_Username.getText();
            String pass = new String(txt_pass.getPassword());
            employee = request.Login(id, pass);
            if (employee == null) {
                JOptionPane.showMessageDialog(this, "Incorrect username or password. Please try again.", "Login error", JOptionPane.ERROR_MESSAGE);
                txt_pass.setText(null);
            } else {
                Account acc = new Account();
                acc.setLoginID(id);
                acc.setPassword(pass);
                employee.setAccount(acc);

                panelBackgroudLogin.setVisible(false);
                panelIndex.setVisible(true);
                lbWelcome.setText("Welcome " + employee.getFullName() + " !");
                request.updateLeaveOutOfDate();
                setHomeBar();
                MenuBar.setVisible(true);
                switch (employee.getOrganization().getOrganizationLevelID()) {
                    case 0:
                        btnApplyLeave.setVisible(false);
                        btnCancel.setVisible(false);
                        btnHistory.setVisible(false);
                        itemApply.setEnabled(false);
                        itemCancel.setEnabled(false);
                        itemHistory.setEnabled(false);
                        break;
                    case 1:
                        tabbedPane_content.setTitleAt(0, "Manager");
                        btnAddEmployee.setVisible(false);
                        itemAdd.setEnabled(false);
                        break;
                    case 2:
                        tabbedPane_content.setTitleAt(0, "Stuff");
                        txtSearch.setVisible(false);
                        lbSearch.setVisible(false);
                        btnAddEmployee.setVisible(false);
                        btnApproveLeave.setVisible(false);
                        itemAdd.setEnabled(false);
                        itemApprove.setEnabled(false);
                        break;
                }
            }
        }
    }

    private void resetMain() {
        mainHomePanel.setVisible(false);
        mainInfoPanel.setVisible(false);
        mainAddEmployee.setVisible(false);
        mainHistoryPanel.setVisible(false);
        mainCancelPanel.setVisible(false);
        mainApplyPanel.setVisible(false);
        txtAreaReson.setText(null);
        mainApproveLeave.setVisible(false);
        mainReport.setVisible(false);
        mainMessagePanel.setVisible(false);
    }

    private ArrayList<LeaveDetail> getListLeaveDetail(int status) {
        ArrayList<LeaveDetail> list = new ArrayList<>();
        Calendar c1 = dateChooserStartDate.getCalendar();
        Calendar c2 = dateChooserFinishDate.getCalendar();
        while (!(c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR) && c1.get(Calendar.MONTH) == c2.get(Calendar.MONTH) && c1.get(Calendar.DAY_OF_MONTH) == c2.get(Calendar.DAY_OF_MONTH))) {
            if (employeebuiness.checkLeaveDateInLeaveDetail(c1.getTime()) || employeebuiness.checkLeaveDateInHoliday(c1.getTime())) {
                c1.add(Calendar.DATE, 1);
            } else {
                LeaveDetail detail = new LeaveDetail();
                detail.setType((LeaveType) comboBoxLeaveType.getSelectedItem());
                detail.setStartLeave(c1.getTime());
                c1.add(Calendar.DATE, 1);
                detail.setFinishLeave(c1.getTime());
                detail.setStatus(status);
                detail.setReson(txtAreaReson.getText());
                list.add(detail);
            }
        }
        return list;
    }

    private void setSummary() {
        listLeaveType = request.getListLeaveType();
        comboBoxLeaveType.setModel(new ModelComboBox(listLeaveType));
        lbAnnualLeaveQuatity.setText(String.valueOf(listLeaveType.get(0).getQuatity()));
        lbMedicalLeaveQuatity.setText(String.valueOf(listLeaveType.get(1).getQuatity()));
        int takenAnnual = request.getTaken(employee, 1, 0);
        int takenAnnualPending = request.getTaken(employee, 1, 1) + request.getTaken(employee, 1, 2);
        lbAnnualLeavePending.setText(String.valueOf(takenAnnualPending));
        lbAnnualLeaveTaken.setText(String.valueOf(takenAnnual));
        int takenMedical = request.getTaken(employee, 2, 0);
        int takenMedicalPending = request.getTaken(employee, 2, 1) + request.getTaken(employee, 2, 2);
        lbMedicalLeavePending.setText(String.valueOf(takenMedicalPending));
        lbMedicalLeaveTaken.setText(String.valueOf(takenMedical));
        lbAnnualLeaveBanlance.setText(String.valueOf(listLeaveType.get(0).getQuatity() - takenAnnual - takenAnnualPending));
        lbMedicalLeaveBanlance.setText(String.valueOf(listLeaveType.get(1).getQuatity() - takenMedical - takenMedicalPending));
    }

    private void setTableApproveModel() {
        listForm = new ArrayList<>();
        if (employee.getOrganization().getOrganizationLevelID() == EmployeeBusiness.MANAGER) {
            listForm = employeebuiness.getForm(employee.getOrganization().getOrganizationLevelID() + 1, employee.getDepartment().getDepartmentID());
        } else {
            listForm = employeebuiness.getForm(employee.getOrganization().getOrganizationLevelID() + 1, null);
        }
        TableApproveLeave.setModel(new ModelTableApproveLeave(listForm));
    }

    private void setModelTableCancelLeave() {
        listLeaveDetail = employeebuiness.getLeaveDetailToCancel(employee);
        tableCancel.setModel(new ModelTableCancelLeave(listLeaveDetail));
        tableCancel.setAutoCreateRowSorter(true);
        tableCancel.setDefaultRenderer(JLabel.class, new StatusColumnCell());
    }

    private void setModelTableHistory() {
        listLeaveDetail = employeebuiness.getLeaveDetailToHistory(employee);
        ModelTableLeaveHistory model = new ModelTableLeaveHistory(listLeaveDetail);
        TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);
        tableHistory.setModel(model);
        tableHistory.setRowSorter(sorter);
        tableHistory.setDefaultRenderer(JLabel.class, new StatusColumnCell());
        PagingTable paging = new PagingTable(mainHistoryPagingLabel, sorter, model);
        paging.initLinkBox(20, 1);
    }

    private void setHomeBar() {
        listLeaveType = request.getListLeaveType();
        int takenAnnual = request.getTaken(employee, 1, 0) + request.getTaken(employee, 1, 1) + request.getTaken(employee, 1, 2);
        int takenMedical = request.getTaken(employee, 2, 0) + request.getTaken(employee, 2, 1) + request.getTaken(employee, 2, 2);
        homeBarAnnual.setMaximum(listLeaveType.get(0).getQuatity());
        homeBarAnnual.setValue(listLeaveType.get(0).getQuatity() - takenAnnual);
        homeBarAnnual.setString(listLeaveType.get(0).getQuatity() - takenAnnual + "/" + listLeaveType.get(0).getQuatity());
        homeBarMedical.setMaximum(listLeaveType.get(1).getQuatity());
        homeBarMedical.setValue(listLeaveType.get(1).getQuatity() - takenMedical);
        homeBarMedical.setString(listLeaveType.get(1).getQuatity() - takenMedical + "/" + listLeaveType.get(1).getQuatity());
    }

    private void setModelTableReportT1() {
        lbReportName.setVisible(false);
        lbReportDepartment.setVisible(false);
        btnReportBack.setVisible(false);
        lbReportLevel.setVisible(false);
        listEmployee = request.getListEmployee(employee);
        ModelTableReportManager model = new ModelTableReportManager(listEmployee, String.valueOf(yearReport.getYear()));
        TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);
        tableReport.setModel(model);
        tableReport.setDefaultRenderer(JLabel.class, new StatusColumnCell());
        tableReport.setRowSorter(sorter);
        PagingTable paging = new PagingTable(mainReportPayingLabel, sorter, model);

        paging.initLinkBox(20, 1);
        tableReport.setCursor(new Cursor(Cursor.HAND_CURSOR));
    }

    private void setModelTableReportT2(Employee e) {
        listLeaveDetail = request.getListLeaveType();
        if(e.getOrganization().getOrganizationLevelID()!=2){
            btnReportBack.setVisible(true);
        }
        lbReportName.setVisible(true);
        lbReportName.setText("Name : " + e.getFullName());
        lbReportDepartment.setVisible(true);
        lbReportDepartment.setText("Department : " + e.getDepartment().getName());
        lbReportLevel.setVisible(true);
        lbReportLevel.setText("Organization : " + e.getOrganization().getName());
        ModelTableReportDetail model = new ModelTableReportDetail(listLeaveType, String.valueOf(yearReport.getYear()), e);
        TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);
        tableReport.setModel(model);
        tableReport.setRowSorter(sorter);
        PagingTable paging = new PagingTable(mainReportPayingLabel, sorter, model);
        paging.initLinkBox(20, 1);
    }

    private void getInformation() {
        lblFullName.setText(employee.getFullName());
        Date birthDay = employee.getBirthday();
        lblBirthday.setText((birthDay.getYear() + 1900) + "/" + (birthDay.getMonth() + 1) + "/" + birthDay.getDay());
        lblGender.setText(employee.getGender());
        lblPhoneNumber.setText(employee.getPhone());
        lblAddress.setText(employee.getAddress());
        lblDepartment.setText(employee.getDepartment().getName());
        lblLevel.setText(employee.getOrganization().getName());
    }

    private void getChangePassword() {
        String pass = employee.getAccount().getPassword();
        String currentPass = new String(pass1.getPassword());
        String newPass = new String(passNew.getPassword());
        String confirmPass = new String(passConfirm.getPassword());


        if (!pass.equals(currentPass)) {
            lblErroChangePass.setText("Error Current Password");
        } else if (!newPass.equals(confirmPass)) {
            lblErroChangePass.setText("Please retype the new password in both boxes confirm password");
        } else if (newPass.length() < 6) {
            lblErroChangePass.setText("new password short");
        } else if (JOptionPane.showConfirmDialog(this, "Do you want to change password ?", "Confirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
            request.changePass(newPass, employee.getEmployeeID());
            JOptionPane.showMessageDialog(this, "Change password is success", "Success", JOptionPane.INFORMATION_MESSAGE);
            employee.getAccount().setPassword(newPass);
            lblErroChangePass.setText(null);
            pass1.setText(null);
            passNew.setText(null);
            passConfirm.setText(null);
        }

    }

    private ArrayList<HolidayDetail> getListHoliday() {
        ArrayList<HolidayDetail> list = new ArrayList<>();
        Calendar c1 = dateChooseStartHoliday.getCalendar();
        Calendar c2 = dateChooseEndHoliday.getCalendar();
        while (!(c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR) && c1.get(Calendar.MONTH) == c2.get(Calendar.MONTH) && c1.get(Calendar.DAY_OF_MONTH) == c2.get(Calendar.DAY_OF_MONTH))) {
            if (employeebuiness.checkLeaveDateInHoliday(c1.getTime())) {
                c1.add(Calendar.DATE, 1);
            } else {
                HolidayDetail detail = new HolidayDetail();
                detail.setStartday(c1.getTime());
                c1.add(Calendar.DATE, 1);
                detail.setFinishday(c1.getTime());
                list.add(detail);
            }
        }
        return list;
    }

    private void resetAddError() {
        addLabelTelephoneError.setVisible(false);
        addLabelLoginError.setVisible(false);
        addLabelPassError.setVisible(false);
        addLabelPassError1.setVisible(false);
    }

    private void logout() {
        panelIndex.setVisible(false);
        panelBackgroudLogin.setVisible(true);
        txt_Username.setText(null);
        txt_pass.setText("1234123141");
        btnAddEmployee.setVisible(true);
        btnInfo.setVisible(true);
        btnHistory.setVisible(true);
        btnApproveLeave.setVisible(true);
        btnCancel.setVisible(true);
        btnApplyLeave.setVisible(true);
        btnReport.setVisible(true);
        MenuBar.setVisible(false);

        itemAdd.setEnabled(true);
        itemApprove.setEnabled(true);
        itemApply.setEnabled(true);
        itemCancel.setEnabled(true);
        itemHistory.setEnabled(true);
        itemAdd.setEnabled(true);
    }
     private void changeinfo() {
        request.changeInfo(employee.getEmployeeID(), txtNumber.getText(), txtAddress.getText());
            }
}
